Able to connect TWO Google Analytics account with SHOPIFY?

periya
New Member
1 0 0

Hi,

I am trying to connect two Google Analytics accounts with shopify. Can i able to connect multiple Google Analytics account with Shopify? IF yes, how can i do it?

0 Likes
Mihai_Seceleanu
Excursionist
14 0 6

Hey there!

You should be able to accomplish this by adding your Universal Analytics code to Shopify just as usually and then use the "Additional Google Analytics" field to paste this instruction: 

ga('create', 'UA-XXXXXXX-Y, 'auto');

Where UA-XXXXXXX-Y must be replaced with the Property ID for the other Analytics Property you wish to track.

Haven't tested it but this is how it's supposed to work in theory.

 

---------------------------------------------------------------
30+ Shopify apps-in-one? Is this even possible?
 

0 Likes
key60529
New Member
1 0 0

Hey @Mihai_Seceleanu , sorry for bothering you, cuz I tried your solution, but still not working, there's no data received by the account that added through additional google analytics, may I know is there any other solution?

0 Likes
ulokoIsaac
New Member
2 0 2

Try the solutions

ga('create', 'UA-XXXXXXXX-1', 'auto', 'clientTracker');
ga('clientTracker.send', 'pageview');

Replace the tracking ID with your tracking ID from the Google Analytics account.  That should do. 

Just place the code in the additional Google analytics script box under the online store > preferences > Google analytics

silverbacklabs
New Member
1 0 1

Hiya... will this also pass on all the ecommerce data?

ThinkingAbout_s
Shopify Expert
9 0 0

Hi @ulokoIsaac  the solution you proposed works but the ecommerce data (ex. Transactions, Revenue, Conversion Rate) are not tracked. Tips how to solve the problem? Thanks for any feedback.

0 Likes
ulokoIsaac
New Member
2 0 2

@ThinkingAbout_s @silverbacklabs 
No it does not work for ecommerce data. But here's a code you can use to send ecommerce data too;
 
Add the code to Settings > Checkout > Additional Script
Remember to use the named tracker. In my example I used newTracker

 

 <script type="text/javascript">
window.addEventListener('load',function(){
ga('newTracker.require', 'ecommerce');
ga('newTracker.ecommerce:addTransaction', {
"id":"{{order_name|handleize}}", // Transaction ID. Required.
"affiliation": "retail.particle.com", // Affiliation or store name.
"shipping": "{{ order.shipping_price|money_without_currency }}",
"revenue": {{order.subtotal_price|money_without_currency}},
"tax": "{{ order.tax_price|money_without_currency }}",
"currency": "{{shop.currency }}"
});

{% for line_item in line_items %}
{% assign list_position = forloop.index + 1 %}
{% assign product_category = '' %}
ga('newTracker.ecommerce:addItem', {
"id": "{{order_name|handleize}}", // Transaction ID. Required.
"name": "{{line_item.title}}",
"sku": "{{ line_item.sku }}",
"category": "{{ line_item.product.collections[0].title }}",
"price": "{{ line_item.line_price | money_without_currency}}",
"quantity": "{{ line_item.quantity }}",
"currency": "{{shop.currency }}",
});
{% endfor %}

ga('newTracker.ecommerce:send');
})
</script>

 

 

MarcinPL
New Member
1 0 0

Is this still Jan 2021 working? @ulokoIsaac newTracker is ID of GA? UA-XXXXX-1 ?

0 Likes