Google tracking - zero cart abandoners

Highlighted
New Member
5 0 0

Hi Guys

 

I'm hoping one of you can help me.  I'm trying to get a google adwords remarketing up and running to target my cart abandoners but in my audience manager it's saying I've got zero cart abandoners (I wish!)

 

My google tracking is working to a point, picking up visitors, converters and general visitors but it's not picking up abandoners.

 

Screenshot 2020-04-30 at 08.34.59.png

 

My memory is hazy as to how I've installed my tracking as it's a couple of years ago.  Wish I'd followed https://www.digitaldarts.com.au/google-analytics-shopify but I only spotted that after I'd installed it....

 

In checkout > Order Processing I've got these additional scripts:

 

Screenshot 2020-04-30 at 08.41.40.png

 

And in my theme.liquid file I have these two bits of google code:

 

Screenshot 2020-04-30 at 08.45.35.png

 

Screenshot 2020-04-30 at 08.45.56.png

 

Really grateful for any thoughts on how to resolve this so I can get my remarketing campaign up and running.

 

Best wishes

 

Aziz

0 Likes
Highlighted

Hello,
Seeing to your theme file, I can see that you are just storing "pageviews" in your adwords data...

for the cart abandoners to be shown, you need to setup event of users who have done add to cart too...

you can do this by just inserting this set of code either there where you have the add to cart button and it loads via javascript using an onclick event... OR.. if the page changes to "/cart" then below this code of yours, insert this

{% elsif template contains 'cart' %}
<script>
gtag('event', 'add_to_cart', {
'send_to': 'AW-xxxxxxx',
'ecomm_pagetype': 'cart',
'ecomm_prodid': [{% for item in cart.items %}'{{item.product.id}}'{% unless forloop.last %},{% endunless %}{% endfor %}],
'ecomm_totalvalue': '{{cart.total_price | money_without_currency | remove: ',' }}'
});
</script>

the shopping cart abandoners work this way that it need to know whether these users have done add to cart or not and then they have went for "purchase" or not.. so "add_to_cart" event is necessary.

Thanks

CedCommerce | Digital Marketing Services

Digital Marketing Analyst
Skype: live:asthaupadhyay_1
E-mail: asthaupadhyay@cedcommerce.com
0 Likes
New Member
5 0 0

Hi Ashta

 

Thank you so much for your response. I've just checked and if I go to the your cart page the page ends "/cart".

 

Can I check my understanding please:

 

1) Where do I need to add the code?  Is it in theme.liquid after this section?

 

Screenshot 2020-04-30 at 08.45.56.png

 

2) Is there a typo in the code as it threw up the following error when I tried to put it there?

 

Line 115 — Liquid syntax error: Unknown tag 'elsif'

 

{% elsif template contains 'cart' %}
<script>
gtag('event', 'add_to_cart', {
'send_to': 'AW-xxxxxxx',
'ecomm_pagetype': 'cart',
'ecomm_prodid': [{% for item in cart.items %}'{{item.product.id}}'{% unless forloop.last %},{% endunless %}{% endfor %}],
'ecomm_totalvalue': '{{cart.total_price | money_without_currency | remove: ',' }}'
});
</script>

 

Many thanks


Aziz

0 Likes
Highlighted
New Member
5 0 0

Hi Ashta

 

Is there any chance you could point me in the right direction on this one please?

 

I can't quite workout where to put the additional code without a syntax error.

 

Thanks


Aziz

0 Likes