URL Parser Variable – In the Google Tag Manager server

In the Google Tag Manager server container go to the Templates section where you want to add the URL parser variable template. Parsing this field is difficult without a special variable template, which is what led me to create a URL parser variable template for server containers. Once successfully added to the workspace, you can navigate to the variables in the container and click a button to create a new variable. The user interface of the variable template is almost identical to the URL variable built into GTM web containers. The server container parses it, activates the container instances, and sends the data to the top-level data stores and third-party providers. Select URL Parser as the type of variable to appear among the available custom templates. Click Search in the gallery next to the Variable Templates field. Server-side markup allows you to send any type of HTTP request to a server-side container. Server-side clients parse these URL strings and convert them to the format required by the event data object. One of the fields of the event data object is page_location, which usually encodes the URL of the page from which the request came. Find the URL parser template in the gallery. Follow these steps to load it into your server container. The variable itself works the same way as the URL variable in Web containers. You can find the template in the Community Template Gallery.