Shopify Collection Page Tracking

Question

I’m trying to do an accurate Shopify Collection page tracking by setting up a wildcard for the term “/collections/.” Still, the thing is that this rule won’t work well because if in Shopify you end up on a product page through a collection, the final product URL will include the /collections/ part; for example, you can see this URL: https://industriasgsl.com/collections/oferta-de-la-semana/products/rotomartillo-pistola-de-impacto-milwaukee-2900-22ct.

That’s a product page, but as you can see, it includes the /collections/ part in the URL, which will cause the data from the heatmap to be wrong.

Is there any way to exclude tracks from pages with specific regex or elements from the URL?

We’re trying to track all the collection pages (catalog pages) like this: https://industriasgsl.com/collections/oferta-de-la-semana/.

Answer

Can you confirm for me that I have all the correct collection URLs listed below:

It looks like some of these have sub-collection pages; is that correct?  But the URL structure appears to remain the same.

If that is the case, then the wildcard pattern you want to use is this: https://industriasgsl.com/collections/*/ The slash at the end is critical to make the pattern only fit the collection pages and not the product detail pages.

Was this article helpful?

Related Articles

Need Support?

Can’t find the answer you’re looking for? Don’t worry we’re here to help!

Submit a request