Analytics

Shopify Pixel integration

Coding knowledge needed

To integrate with Shopify Pixel, you’ll need some basic coding knowledge. For guidance on managing custom pixels to track customer events, see the Shopify documentation. Please note, we don't provide support for third-party integrations like Google Analytics. For help with those, we recommend consulting a developer.

Overview of Shopify Pixel integration

The Specification & Compare app automatically publishes events that custom pixels can subscribe to, allowing you to send this data to third-party analytics systems like Google Analytics. These events enable tracking of customer interactions with comparison tables.

To create a custom pixel and subscribe to events, see the Shopify documentation.

Events

Currently, the app publishes four types of events. If you need additional events, please contact our support team with a use case example, and we’ll consider your request.

comparison_product_viewed

The comparison_product_viewed event logs when a user clicks the "View details" button for a product in a comparison table (static or dynamic).

Properties:

  • product: { handle }: the handle of the clicked product.

Example pixel code:

analytics.subscribe('comparison_product_viewed', (event) => {
  console.log(event.data.product.handle); // Handle of product being clicked
});

dynamic_comparison_modal_opened

The dynamic_comparison_modal_opened event logs when a user opens the dynamic comparison modal (Pro plan only).

Properties:

  • products: [{ handle }]: the list of products being compared when the dynamic comparison is opened.

Example pixel code:

analytics.subscribe('dynamic_comparison_modal_opened', (event) => {
	event.data.products.forEach(product => {
		console.log(product.handle);
	})
});

dynamic_comparison_product_added

The dynamic_comparison_product_added event logs when a user adds a product to the dynamic comparison list (Pro plan only).

Properties:

  • product: { handle }: the product being added to the dynamic comparison.

Example pixel code:

analytics.subscribe('dynamic_comparison_product_added', (event) => {
  console.log(event.data.product.handle); // Handle of product being added
});

dynamic_comparison_product_removed

The dynamic_comparison_product_added event logs when a user removes a product to the dynamic comparison list (Pro plan only).

Properties:

  • product: { handle }: the product being removed to the dynamic comparison.

Example pixel code:

analytics.subscribe('dynamic_comparison_product_removed', (event) => {
  console.log(event.data.product.handle); // Handle of product being removed
});

FAQ

How does this affect customer privacy?

Shopify Pixel respects customer privacy and does not track visitors who have opted out of tracking. For more information, see the Shopify documentation.

Do you store data on your servers?

No, we don't store or manage any data on our servers to ensure compliance with local regulations. All events are sent solely through Shopify Pixel.

Previous
Translating product attributes