Hi there, I have problem with setting server side Adform tracking. I migrate tags from browser GTM to server. Remarketing in server GTM is working properly, but conversion in Adform has some error. The tag is fired but it says “Exception thrown” and in Console in sGTM I can read “TypeError: Cannot read properties of null (reading ‘user_agent’)”. All other media tags (FB, GAds) are sending data properly. I am using the Stape template for AdForm. Where can be the problem?
Judging by the error, the value in the user_agent parameter is either missing or incorrect.
Can you check what value you have in event data for user agent?
Hi Alex, I cant see anything strange - in event data I can see ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36). The information as in other events. What is also strange - in remarketing - in debug, there is no requests visible - no browser or server. I can see only that the tag was fired.
It is normal that there is no outgoing request with page view event type here. In this case the tag only works to set a cookie if the url has the parameter you specify. This tag only sends data on conversion events that you have configured. Almost all tags of affiliate platforms work in a similar way.
Great, but still, where is the problem with conversion what I wrote before?
Can you please show screenshots of the problem and your setup? I think without that it would be difficult to guess what the causes of this might be
Of course. There shouldnt be any problem with trigger as I use it also for another tags and it work well. I have problem only with adform tag. During firing - there is written “exception thrown”. (I cant to send more pictures in 1 post because I am a new user).
Thanks for the details, but can you please also show a screenshot of the ‘user_agent’ parameter from Event Data in preview mode?
The tag also checks the ‘User-Agent’ header of the incoming requester. So you also need to check that as well.
Thank you!
Looks like the tag doesn’t check the event data itself for some reason, I’ll tell the devs to add it in the next update.
Simple fix for this now you need to add these parameters to the tag manually from event data and everything should work:
Hi Alex, thank you very much. It is working:)