Open
Description
Hello,
I am trying to pass UTM parameters in the Buy Button checkout URL to track sales from different sources. For example, I will have the same Buy Button Code on three other sites and want to track sales for each. I have tried manipulating the URL using the following event function, but the landing_site or UTM tracking parameters are not working or do not work with the Buy Button. For context, I use the same code for the Online Store and can see tracking in the reports. Also, the code below allows me to pass the URM parameters in the URL. However, Shopify is not recognizing them in the reports.
"events": {
afterInit: (cart) => {
cart.onCheckout = () => {
const checkoutUrl = cart.model.webUrl + '?utm_campaign=dune_test&utm_id=12345&utm_medium=affiliate_buybutton&utm_source=fandango';
cart.checkout.open(checkoutUrl);
};
},
},
Does anyone know or have had experience or success tracking sales with Google Analytics or UTM parameters from Buy Button?
Metadata
Metadata
Assignees
Labels
No labels