Server-side Google Tag Manager (SSGTM) is a powerful tool for managing and deploying tags and tracking data on your website. However, setting up and testing your tags can be a bit more complex than with the standard GTM. In this blog post, we’ll take a look at how to preview requests in server-side Google Tag Manager.
What is request preview in server-side Google Tag Manager?
Request preview is a feature in SSTGTM that allows you to preview and test your server-side tags before they are deployed on your website. With request preview, you can see exactly how your tags will behave and what data they will collect, without actually deploying them to your live site.
How to enable request preview in server-side
Google Tag Manager Enabling request preview in SSTGTM is a bit different than in the standard GTM. Here’s how to do it:
- Log in to your tag management platform and navigate to your container for your website.
- Go to the “Server” section of the container settings.
- Under “Debug Settings,” click on “Enable Debug Mode.”
- Copy the “Server Debug URL” that appears.
How to preview server-side tag requests
Once you have enabled debug mode in SSGTM, you can preview your server-side tags by following these steps:
- Open a new browser tab and paste the “Server Debug URL” that you copied earlier into the address bar.
- Add any query parameters or data to the end of the URL to simulate a tag firing. For example, you might add a query parameter for a specific page on your website, or for a specific event.
- Hit enter to load the URL.
- In the tag management platform, navigate to the “Server Debug Logs” section to see the results of the tag request.
Section 5: Tips for previewing server-side tag requests
Here are a few tips to keep in mind when previewing server-side tag requests:
- Use query parameters to simulate different scenarios on your website. For example, you might simulate a user clicking a specific button or visiting a specific page.
- Use the tag management platform’s debugging tools to troubleshoot any issues that arise during testing.
- Make sure to disable debug mode when you’re done testing to avoid accidentally deploying tags to your live site.
Conclusion
Previewing server-side tag requests is an important step in setting up and testing your tags in SSGTM. By enabling debug mode and using the tag management platform’s debugging tools, you can ensure that your tags are working correctly and collecting the data you need. While it may take a bit of extra effort to set up and test server-side tags, the benefits in terms of speed, privacy, and flexibility can make it well worth the effort.