Pinterest help needed. How to include Product IDs in your Add to basket events.

Pinterest help needed. How to include Product IDs in your Add to basket events.

EmmaBee78
Tourist
6 0 3

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

 

Screenshot 2024-08-16 at 12.28.28.png

Replies 13 (13)

Sam_Mahmud
Shopify Partner
194 4 10

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. 

https://prnt.sc/NurP6JfY6lh5

 

Then send the items/product array as line items.

 

https://prnt.sc/fIO0SDHzLFb3

 

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

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
EmmaBee78
Tourist
6 0 3

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

 

 

Sam_Mahmud
Shopify Partner
194 4 10

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

https://prnt.sc/V0o_l-6-sJEA

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.

 

 

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
EmmaBee78
Tourist
6 0 3

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. 

Sam_Mahmud
Shopify Partner
194 4 10

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

 

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
Sam_Mahmud
Shopify Partner
194 4 10

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

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
acsjodin
New Member
4 0 0

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. Screenshot 2024-09-05 at 1.21.04 PM.pngScreenshot 2024-09-05 at 1.22.27 PM.png



Sam_Mahmud
Shopify Partner
194 4 10

Hi,

Remove the semi-colon from the last line as it is indicating the line no 14. 

 

Sam_Mahmud_0-1725557461852.png

 

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
acsjodin
New Member
4 0 0

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? 

 

Sam_Mahmud
Shopify Partner
194 4 10

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

 

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
acsjodin
New Member
4 0 0
Sam_Mahmud
Shopify Partner
194 4 10

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

 

Theme dependent datalayer event begin checkout.png

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like
acsjodin
New Member
4 0 0

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!