Tracking Shopify Scripts?

Highlighted
New Member
7 0 0

Has anyone found a way to track how many times a script has been used? Ideally in Google Analytics? We've tried firing custom event, internal promos, and order coupons, but none have worked thusfar.

0 Likes
Highlighted
Shopify Expert
240 0 38

It sounds like GA events should work for this. Can you share more about how you tried to implement it?

Technical SEO Consultant - Specialising in setting up Structured Data for Rich Snippets, Google Analytics for advanced reports and the Google Search Console for efficient crawling.
0 Likes
Highlighted
Tourist
27 0 1

I'm not even sure how you could track this in GA??  I'm very interested in this as well??

0 Likes
Highlighted
Shopify Expert
240 0 38

You can call GA at any time and trigger an event:

https://developers.google.com/analytics/devguides/collection/analyticsjs/events

Hopefully you can place a call in the script, or maybe it provides a way to hook in a function that makes the call.

Technical SEO Consultant - Specialising in setting up Structured Data for Rich Snippets, Google Analytics for advanced reports and the Google Search Console for efficient crawling.
0 Likes
Highlighted
New Member
5 0 0

Hi there, I have recently setup a few promos via Shopify Scripts. The way I used to track the script is to fire an event whenever the Promo is triggered in the online store.

I.e. Whenever a customer click "Add to Cart" button fires an Buy One Get One Free promo (by Script). So I can send this GA event when the "Add to Cart" button is clicked.

$('#addToCart').click(function(e){

ga('send', {
  hitType: 'event',
  eventCategory: 'XXX',
  eventAction: 'click',
  eventLabel: 'BOGO Promo'
});

});

0 Likes
Highlighted
New Member
5 0 0

Hi there, I have recently setup a few promos via Shopify Scripts. The way I used to track the script is to fire an event whenever the Promo is triggered in the online store.

I.e. Whenever a customer click "Add to Cart" button fires an Buy One Get One Free promo (by Script). So I can send this GA event when the "Add to Cart" button is clicked.

$('#addToCart').click(function(e){

ga('send', {
  hitType: 'event',
  eventCategory: 'XXX',
  eventAction: 'click',
  eventLabel: 'BOGO Promo'
});

});

 

0 Likes
Highlighted
New Member
5 0 0

I have recently setup a few promos via Shopify Scripts. The way I used to track the script is to fire an event whenever the Promo is triggered in the online store.

I.e. Whenever a customer click "Add to Cart" button fires an Buy One Get One Free promo (by Script). So I can send this GA event when the "Add to Cart" button is clicked.

0 Likes