GTM Server Container With Query via datalayer

Hey All,

Wondering if there is anyone that can provide guidance.

I am trying to set up a variable based on a query parameter in GTM-server. but the parameter is not not matching, as I am assuming it is due to the GTMweb message not including the parameter in the request.

The URL looks to be held in the page_location, wondering if it is possible to either:

  • set the request name from GTMweb to GTMserver as the URL (preferably after the .com/)
  • once it has landed into GTMserver, change the request from data/ to the URL (less before the .com/)



Hey Chris,

Don’t quite understand what you’re trying to achieve here.

page_location does hold the full URL, including any query parameters, if you have trouble picking those up you can just grab your query on the web (there’s a native variable) and send it explicitly to your sGTM.

Hope this helps

Hey Dan,

Sorry, I didn’t see this alert for some reason (my end I think).

from what I was seeing page_location on GTM-web was as expected, but i guess when it sent it to the GTM-server it wasnt sending across the page_location.

Chris, page_location is part of the common event data, it would be sent by default both by GA4 and Data Tag