recording user events-reg

106 views
Skip to first unread message

Nandhu Priyan

unread,
Sep 4, 2021, 12:32:16 PM9/4/21
to cloud-recommendations-users
                I was tried to record user events in recommendation AI using google tag manager. First of all I created a RecommendationsAI tag, trigger and variable in GTM(Google Tag Manager) as per the documentation. After that I have performed some events in my e-commerce site. The events are displayed in GTM and also the tag was fired when i performed some events but the events are not recorded or shown in the RecommendationsAI page. Colud someone please help me to do this thing.

Nandhu Priyan

unread,
Sep 4, 2021, 10:12:51 PM9/4/21
to cloud-recommendations-users
could anyone please give a reply

Nandhu Priyan

unread,
Sep 6, 2021, 3:39:54 AM9/6/21
to cloud-recommendations-users
                I created many tags but the tag which I created for cloud retail was fired but it is showing the failed status. Could anyone please me solve this thing. Thank you!

Nandhu Priyan

unread,
Sep 6, 2021, 6:11:23 AM9/6/21
to cloud-recommendations-users
              In google tag manager I used both recommendation ai tag and also retail tag but still the tag showing the status is failed. 

Nandhu Priyan

unread,
Sep 7, 2021, 4:33:53 AM9/7/21
to cloud-recommendations-users
                Anybody please respond to me...

patrickhess

unread,
Sep 10, 2021, 12:33:45 PM9/10/21
to cloud-recommendations-users
Hi Nandhu,

A few questions:
1) Did you go to your network console to see if an API request is made?
2) What do you use as your data source (which of the 4 options)? Its possible you do not correctly populate this data source

Cheers,
Patrick

patrickhess

unread,
Sep 10, 2021, 2:24:51 PM9/10/21
to cloud-recommendations-users
One more question - I can enable to your tag for debugging logs - if you give me your tag id. 

Nandhu Priyan

unread,
Sep 10, 2021, 11:22:19 PM9/10/21
to cloud-recommendations-users
Hi patrickhess,
              First of all thank you for your reply. I saw my network console and there is an API request for other google products are made but I cant find any request for RecommendationsAI.  I gave an API key and project number in the GTM recommendationsAI tag but i don't know why I can't able to record user events.

Nandhu Priyan

unread,
Sep 10, 2021, 11:35:41 PM9/10/21
to cloud-recommendations-users
                  I am going to record user events via GTM right why I need a data source and in the recording user events documentation also I can't find anything about data source. If I am wrong please correct me. Thank you.

Nandhu Priyan

unread,
Sep 10, 2021, 11:45:24 PM9/10/21
to cloud-recommendations-users
          I need to send my container ID to all. Shall I send only to you but I can't find your chat ID.

patrickhess

unread,
Sep 13, 2021, 10:43:50 AM9/13/21
to cloud-recommendations-users
Please refer to this documentation for what data source should look like: https://cloud.google.com/retail/recommendations-ai/docs/record-events#datalayer-gtm. You most likely have an incorrectly formatted data source - this is usually the cause of the issue you are experiencing
If you use a data variable, it needs to be in the Cloud Retail format, and it needs to be a JSON object (of the form {}). 

You send the tag id (not container id) to my email

Nandhu Priyan

unread,
Sep 14, 2021, 3:14:00 AM9/14/21
to cloud-recommendations-users
             Could you please tell me where the tag ID is located in tag manager. I also searched in google but it is showing the container ID only. I can't find tag ID that's why I am asking and also please send me your mail ID. Thank you. 

patrickhess

unread,
Sep 14, 2021, 11:08:31 AM9/14/21
to cloud-recommendations-users
Hi,

The container id will do actually, thank you. Before you do that though - can you put a screenshot of your GTM tag in debug mode and show me the exact format of your data variable? I am fairly confident your data is incorrectly format and why it is not being sent. 

Cheers,
Patrick

Nandhu Priyan

unread,
Sep 14, 2021, 1:16:11 PM9/14/21
to cloud-recommendations-users
                 I had send my ContainerID to your mail and please check and tell me if there is any mistake I had done... 

Nandhu Priyan

unread,
Sep 15, 2021, 1:03:08 AM9/15/21
to cloud-recommendations-users
                       I am stuck and I have no idea what to do could please respond me fast... because I can't move further without doing this and My project was hanging...

Nandhu Priyan

unread,
Sep 15, 2021, 8:19:50 AM9/15/21
to cloud-recommendations-users
              The firing status of the tag was succeeded but I can't see the real time events in the recommendationsAI page...  

patrickhess

unread,
Sep 15, 2021, 10:53:02 AM9/15/21
to cloud-recommendations-users
A few things to check:
1) check the error tab in our UI to see if you have any errors under the events sections - your events might be malformed
2) Post a screenshot of your networking tab when the event is sent - can you show that it fires a 200?

Nandhu Priyan

unread,
Sep 16, 2021, 2:23:49 AM9/16/21
to cloud-recommendations-users
This is the screenshot Network headers tab.
Screenshot from 2021-09-16 11-09-30.png


And this is the screenshot of network tab
Screenshot from 2021-09-16 11-08-40.png


In recommendations AI page it is showing like this... 
Screenshot from 2021-09-16 11-52-12.png

Nandhu Priyan

unread,
Sep 16, 2021, 2:28:01 AM9/16/21
to cloud-recommendations-users
This google tag manager Network tab...Screenshot from 2021-09-16 11-57-10.png

patrickhess

unread,
Sep 16, 2021, 6:56:51 PM9/16/21
to cloud-recommendations-users

Hi,

I am not seeing any outbound api calls to our api so seems like the tagging is not sending the data.
Can you show me a screenshot in the GTM Preview what the Cloud Retail Variable looks like? It should show that when you click on the Cloud Retail GTM tag firing what the values it fired with.

Regards,
Patrick

patrickhess

unread,
Sep 16, 2021, 6:59:48 PM9/16/21
to cloud-recommendations-users
Separately, how are you sending data to Google Analytics? Maybe we can re-use that alternatively to send us data (we support GTM with GA data => retail api)

Nandhu Priyan

unread,
Sep 17, 2021, 12:50:46 AM9/17/21
to cloud-recommendations-users
                   I am sending data to Google Analytics using GTM and also I have mentioned Tracking Id of Google Analytics in my website in backend... and also I am not using retail API because I am using V1beta1 version of RecommendationAI. I tried to migrate to Google Retail but I can't able to generate API in Retail page it is showing me like this.
Screenshot from 2021-09-17 10-08-07.png
 The "GET STARTED" button is disabled and I clicked the link of "Contact Sales" and I submitted the details they asked me but I didn't get any reply from them.

Nandhu Priyan

unread,
Sep 17, 2021, 1:24:47 AM9/17/21
to cloud-recommendations-users
            I created the retail tag and it is fired successfully. I have put product impressions script code in the backend of my magento2 site. when I give that script only the tag is working otherwise it is'nt working and I got like firing status is failed. I don,t know why this is happening. I am using Enhanced ecommerce dataLayer and I mentioned visitorId variable and eventType alone. If anything else I need to give inside that tag. Please correct if i have done anything wrong.

This is recommendation AI tag(Variables) screenshot
Screenshot from 2021-09-17 10-43-26.jpg
RC2SS.jpg

This is Retail tag screenshot
Retail1SS.jpg

patrickhess

unread,
Sep 17, 2021, 2:11:02 PM9/17/21
to cloud-recommendations-users
Can you show me the content of your data layer? You can do this by navigating to the chrome console, and typing in "dataLayer". My guess is its not correctly populated - you need a special "ecommerce" key - see documentation: https://developers.google.com/tag-manager/enhanced-ecommerce

patrickhess

unread,
Sep 17, 2021, 2:30:50 PM9/17/21
to cloud-recommendations-users
If you send me a link to your site, I can also inspect the data layer myself 

Nandhu Priyan

unread,
Sep 20, 2021, 12:37:49 AM9/20/21
to cloud-recommendations-users
            Yeah... I also follow the same documentation and copied and pasted the measuring the productImpressions and measuring the productClicks script code in the backend of my website... It worked but they were recorded as unjoined events how can I make it as joined events... I need to write the script for all the products??? please denote I have done any mistakes... Thank you patrick...    

Nandhu Priyan

unread,
Sep 20, 2021, 12:38:57 AM9/20/21
to cloud-recommendations-users

This is the link of my site: http://18.142.100.226/

Thank you

Patrick Hess

unread,
Sep 20, 2021, 12:19:40 PM9/20/21
to cloud-recommendations-users
I took a look at your page and your ecommerce data layer is not correctly populated - e.g. on this page you have no event for the detail page view:
Screen Shot 2021-09-20 at 9.12.36 AM.png


Please follow the detailed instructions in https://developers.google.com/tag-manager/enhanced-ecommerce - and once that is done, try again? 

 

Nandhu Priyan

unread,
Sep 21, 2021, 10:07:33 AM9/21/21
to cloud-recommendations-users
             I created the datalayer but I can't understand the documentation clearly... for eg: The dataLayer for product impression contains many fields... I don't understand what is this list and position in the DataLayer... and also I have copied the product impression code without any modifications and put it into my backend of the website it is working perfectly But I made some changes in the productImpressions dataLayer and put the script code in the backend at that time it is showing like firing status is failed...  Colud you please give me a correct format of a dataLayer... Thankyou
Reply all
Reply to author
Forward
0 new messages