Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I'm having trouble fixing my conversion source issues with my Pinterest tag. See screenshot below.
I think the main problem is I need to have an add to basket event and include Product IDs in my Add to basket events. But I cant figure out what I need to do.
Where do I find the code for add to basket event? I am using the theme 'Dawn'.
Thanks for your help,
Emma
Hello Emmabee78,
Thanks for your query.
could you please share your website URL?
Pinterest tag doesn't receive the GA4 schema items array. like item_id, item_name, item_price
it accepts product_id, product_name,product_price
as the event manager matches only item id that's why showing this error for not sending product_id.
you have to convert the GA4 Items array to the Pinterest product array by custom javascript.
Then send the items/product array as line items.
from this array, Pinterest will automatically detect the product ID.
All of these can be done via Google Tag Manager.
feel free to ask if you have any questions.
Thanks
Hi,
Thank you for your speedy response.
However you'll have to dumb it down some as I don't understand.
What has Google Analytics got to do with the Pinterest tag add to cart event code?
my site is mustardandmint.myshopify.com
Emma
Hi Emmabee78,
GA4 data layer indicate the schema/structure that google analytics, google ads use to grab the data https://prnt.sc/ahAfVUohLgNJ
and
Pinterest tag structure are not the same as google datalayer structure.
as your website has GA4/google schema datalayer https://prnt.sc/MqYcpAN3RtSP
so, this structure needs to be converted as product_id, product_name
only you can do it by custom javascript in Google Tag Manager.
IF you use Pinterest app to track the conversion in shopify apps this solution won't be applicable. only for Google Tag Manager setup.
If you'd like to discuss this more, don't hesitate to send me a PM
Thanks.
Hi, thanks again for the response.
Nothing on Pinterest tells me anything about what you mention. Sounds too technical for what I need.
I’m trying to set up the Pinterest AddToCart Event code on my Dawn theme, but I can’t seem to find where to paste it.
Hi emma,
As i said it is not the solution for the Pinterest app.
this solution is an alternative method by using Google Tag Manager.
You can paste in the theme file. liquid head section .
but I don't this this will work.
until you enable the datalayer and create tag trigger variable for pinterest add to cart event.
Thanks
Hi Emmabee,
As I mentioned this solution Is not with Pinterest apps.
This is only if you use Google Tag Manager to set up your Pinterest tag.
As it is a technical set up you must take expert help.
you can place add to cart event code at theme.liquid head section.
If you'd like to discuss this more, don't hesitate to send me a PM.
Thanks
I am not the OP, but I am having a similar issue so I'm hoping you can help me. I went into the google tags manager, added the custom javascript as you noted, but when I go to publish, it tells me there's a parsing error. I have tried tweaking everything it suggests, but every time it just throws a totally different parsing error. I'm not a developer so I am having trouble figuring out what I am doing wrong here.
Hi,
Remove the semi-colon from the last line as it is indicating the line no 14.
Thank you for such a quick response!! Now it's telling me I have an unknown variable (“div-ecommerce.items”). Is there somewhere I need to look for these? I just copied exactly what you put in here earlier, but does it need to be tailored to my specific site?
HI,
that one is the datalayer variable.
you must have a data layer to fetch the data by GTM.
could you please share your website URL? i will check the datalayer.
Thanks
Thanks for sharing.
I checked that their is no datalayer for tracking.
so first need to configure the datalayer and this javascript code would work.
I have also the datalayer for shopify which track view content to begin_checkout.
as it is not open source i am not able to share it publicly.
If you want to discuss more about the datalayer don't hesitate to send me a PM.
Thanks
Thank you! I'll take a look as soon as I get a chance, and PM you if I have any additional questions. I appreciate your help!
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024