{"id":29712,"date":"2025-01-15T22:24:56","date_gmt":"2025-01-15T22:24:56","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/new-piwik-pro-templates-in-server-side-google-tag-manager\/"},"modified":"2025-01-15T22:24:56","modified_gmt":"2025-01-15T22:24:56","slug":"new-piwik-pro-templates-in-server-side-google-tag-manager","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=29712","title":{"rendered":"New Piwik PRO Templates In Server-side Google Tag Manager"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p><a href=\"https:\/\/piwik.pro\">Piwik PRO<\/a> has <strong>two<\/strong> new <a href=\"https:\/\/www.simoahava.com\/analytics\/server-side-tagging-google-tag-manager\/\">server-side Google Tag Manager<\/a> templates, and this article explains what they are and how they work.<\/p>\n<p>The first template, <a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2-client\"><strong>Piwik PRO Client<\/strong><\/a>, is designed to work in unison with the <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/web\/javascript_tracking_client\/index.html\">Piwik PRO HTTP API<\/a>. Most often these requests are generated by the Piwik PRO JavaScript tracker, but theoretically <em>any<\/em> HTTP source that uses the same schema can send requests for the Client to claim. Once the Client claims the request, it generates an <strong>event data object<\/strong> that can be consumed by tags in the server-side Google Tag Manager container.<\/p>\n<p>The second template, <a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2\"><strong>Piwik PRO<\/strong><\/a>, is a tag template that takes the <em>event data object<\/em>, compiles it into the format required by the <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/api\/http_api.html\">Piwik PRO HTTP API<\/a>, and then dispatches it to the Piwik PRO instance.<\/p>\n<p>These two templates enable (at least) these two approaches:<\/p>\n<ol>\n<li>Use some other vendor\u2019s tracker, such as <strong>Google Tag<\/strong> in the browser. Forward the hits to server-side Google Tag Manager. Claim the requests with the vendor\u2019s own Client (such as the GA4 Client), and use this data to fire the vendor\u2019s own tag <em>as well as<\/em> the Piwik PRO tag.<\/li>\n<\/ol>\n<div style=\"aspect-ratio: 1920 \/ 1080;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/ga4-client-to-tags.jpg\" title=\"First approach, GA4 client to tags\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1080\" width=\"1920\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/ga4-client-to-tags.jpg#ZgotmplZ\" alt=\"First approach, GA4 client to tags\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<ol start=\"2\">\n<li>Use the <strong>Piwik PRO JavaScript tracker<\/strong> in the browser. Forward the hits to server-side Google Tag Manager. Claim the requests with the <strong>Piwik PRO Client<\/strong>, and use this data to fire the Piwik PRO tag and other vendors\u2019 tags, too, such as those designed for <strong>Google Ads<\/strong> and <strong>Meta Conversions API<\/strong>.<\/li>\n<\/ol>\n<div style=\"aspect-ratio: 1920 \/ 1080;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/pp-client-to-tags.jpg\" title=\"Piwik PRO Client to tags\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1080\" width=\"1920\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/pp-client-to-tags.jpg#ZgotmplZ\" alt=\"Piwik PRO Client to tags\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>If you\u2019re curious about the first approach, check out this <a href=\"https:\/\/www.simoahava.com\/analytics\/ga4-to-piwik-pro-using-server-side-google-tag-manager\/\">article I\u2019ve written about mapping Google Analytics 4 data to Piwik PRO<\/a> using the new Piwik PRO tag template.<\/p>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"the-client-template\">The Client template<\/h2>\n<div style=\"aspect-ratio: 1362 \/ 1030;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-client.jpg\" title=\"Piwik PRO Client\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1030\" width=\"1362\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-client.jpg#ZgotmplZ\" alt=\"Piwik PRO Client\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The <strong>Piwik PRO Client<\/strong> template has been designed to capture requests that originate in Piwik PRO\u2019s client-side libraries.<\/p>\n<p>For example, <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/web\/javascript_tracking_client\/api.html#setTrackerUrl\">with the JavaScript API<\/a>, you can use a command like this to route all subsequent events by the tracker to your server-side Google Tag Manager endpoint:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\">_paq.push([<span style=\"color:#a50\">\"setTrackerUrl\"<\/span>, <span style=\"color:#a50\">\"https:\/\/sgtm.my-website.com\/ppms.php\"<\/span>]);\n<\/code><\/pre>\n<\/div>\n<p>If you\u2019re using the <a href=\"https:\/\/help.piwik.pro\/support\/getting-started\/google-tag-manager-install-a-tracking-code\/\">Piwik PRO Analytics template<\/a> for <strong>client-side<\/strong> Google Tag Manager, you can use the <strong>Use a custom tracker URL<\/strong> setting to achieve the same easily:<\/p>\n<div style=\"aspect-ratio: 904 \/ 256;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/custom-tracker-url.jpg\" title=\"Custom tracker URL\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"256\" width=\"904\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/custom-tracker-url.jpg#ZgotmplZ\" alt=\"Custom tracker URL\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>When a request comes in for the <code>\/ppms.php<\/code> resource, the Piwik PRO Client (in server-side Google Tag Manager) <strong>claims<\/strong> the request and proceeds to generate an <strong>event data object<\/strong> with both <em>common<\/em> event data keys as well as Piwik PRO-specific items.<\/p>\n<h3 id=\"how-to-install-the-template\">How to install the template<\/h3>\n<p>Because Google Tag Manager\u2019s <a href=\"https:\/\/tagmanager.google.com\/gallery\/#\/\">Community Template Gallery<\/a> doesn\u2019t support distributing Client templates, you need to install the template manually.<\/p>\n<p>First, navigate to the <code>template.tpl<\/code> file in the <a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2-client\">GitHub repo<\/a> for the Client by following <a href=\"https:\/\/raw.githubusercontent.com\/PiwikPRO\/server-side-template-for-gtm-v2-client\/master\/template.tpl\">this link<\/a>. Download the file to your device.<\/p>\n<p>Then, in your server-side Google Tag Manager container, browse to <strong>Templates<\/strong> and create a new <strong>Client<\/strong> template.<\/p>\n<div style=\"aspect-ratio: 1762 \/ 1070;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/create-new-client.jpg\" title=\"Create new client\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1070\" width=\"1762\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/create-new-client.jpg#ZgotmplZ\" alt=\"Create new client\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Once the editor opens, click the overflow menu in the top-right corner and choose <strong>Import<\/strong>.<\/p>\n<div style=\"aspect-ratio: 1482 \/ 440;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/import-template.jpg\" title=\"Import template\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"440\" width=\"1482\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/import-template.jpg#ZgotmplZ\" alt=\"Import template\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Locate the <code>template.tpl<\/code> file on your device, and select it to import it.<\/p>\n<p>You should see the template load in the editor. Click <strong>Save<\/strong> to save the template.<\/p>\n<p>Once the template is saved, head on over to <strong>Clients<\/strong> in the container, and click to create a new Client.<\/p>\n<div style=\"aspect-ratio: 1818 \/ 692;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/create-client.jpg\" title=\"Create new Client\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"692\" width=\"1818\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/create-client.jpg#ZgotmplZ\" alt=\"Create new Client\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Select the <strong>Piwik PRO Client<\/strong> from the list of available templates.<\/p>\n<h3 id=\"how-to-configure-the-client-template\">How to configure the Client template<\/h3>\n<p>The Client template has only a few configuration options. It\u2019s designed to work <strong>automatically<\/strong> whenever Piwik PRO JavaScript requests are dispatched to the server-side Google Tag Manager container.<\/p>\n<p>The only manually configurable option is labeled <strong>Serve requests for ppms.js<\/strong>.<\/p>\n<div style=\"aspect-ratio: 918 \/ 452;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/serve-requests-for-ppms-js.jpg\" title=\"Serve requests for ppms.js\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"452\" width=\"918\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/serve-requests-for-ppms-js.jpg#ZgotmplZ\" alt=\"Serve requests for ppms.js\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Checking this option enables <strong>first-party serving<\/strong> of the Piwik PRO JavaScript library.<\/p>\n<blockquote>\n<p>This means that instead of loading the JavaScript from Piwik PRO\u2019s own content distribution network, you load the library from the server-side Google Tag Manager domain. You need to <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/web\/javascript_tracking_client\/installation.html\">configure your client-side Piwik PRO installation<\/a> to load the <code>ppms.js<\/code> file from your own domain.<\/p>\n<\/blockquote>\n<p>When you enable this option, you need to provide the <strong>Account name<\/strong> of your Piwik PRO environment. You also need to list all the <strong>allowed URL origins<\/strong> from which requests for the <code>ppms.js<\/code> file are considered. Add the list of origins as a comma-separated string:<\/p>\n<p><code>https:\/\/www.my-website.com,https:\/\/www.my-website.de,https:\/\/store.my-other-website.com<\/code><\/p>\n<p>Check <strong>Cache the resource in server-side GTM<\/strong> to reduce <em>network egress costs<\/em> by storing the file (temporarily) in the server cache.<\/p>\n<p>Once you save the Client and publish (or preview) the container, the Client is active and ready to intercept incoming requests.<\/p>\n<h3 id=\"how-the-client-works\">How the Client works<\/h3>\n<p>The Client parses the incoming request from the web browser and creates an <strong>event data object<\/strong> with it.<\/p>\n<div style=\"aspect-ratio: 1958 \/ 1318;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-client-event-data.jpg\" title=\"Event data object\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1318\" width=\"1958\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-client-event-data.jpg#ZgotmplZ\" alt=\"Event data object\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>In server-side Google Tag Manager, the only way that <strong>tags<\/strong> can fire is if a Client generates an event data object. This object typically contains <a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side\/common-event-data\">common event data<\/a> as well as vendor-specific keys.<\/p>\n<p>The Piwik PRO Client generates these <strong>common event data<\/strong> keys:<\/p>\n<table>\n<thead>\n<tr>\n<th>Event data key<\/th>\n<th>Piwik PRO request parameter<\/th>\n<th>Description<\/th>\n<th\/>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>event_name<\/code><\/td>\n<td>N\/A<\/td>\n<td>The request event type. This is not always applicable to Piwik PRO requests.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>client_id<\/code><\/td>\n<td><code>_id<\/code><\/td>\n<td>The Visitor ID.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>ip_override<\/code><\/td>\n<td><code>cip<\/code><\/td>\n<td>The IP address of the visitor.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>language<\/code><\/td>\n<td><code>lang<\/code><\/td>\n<td>The browser language string.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>page_location<\/code><\/td>\n<td><code>url<\/code><\/td>\n<td>The URL of the page the request was sent from.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>page_path<\/code><\/td>\n<td>N\/A<\/td>\n<td>The URL path of the page the request was sent from.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>page_referrer<\/code><\/td>\n<td><code>urlref<\/code><\/td>\n<td>The referrer URL of the page the request was sent from.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>screen_resolution<\/code><\/td>\n<td><code>res<\/code><\/td>\n<td>The screen resolution of the visitor\u2019s device.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>ua<\/code><\/td>\n<td><code>ua<\/code><\/td>\n<td>The User-Agent string of the web browser.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>user_id<\/code><\/td>\n<td><code>uid<\/code><\/td>\n<td>The login ID of the visitor.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>value<\/code><\/td>\n<td><code>revenue<\/code><\/td>\n<td>The revenue of the order.<\/td>\n<td\/>\n<\/tr>\n<tr>\n<td><code>value<\/code><\/td>\n<td><code>e_v<\/code><\/td>\n<td>The event value.<\/td>\n<td\/>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Any parameter that isn\u2019t listed here but is part of the incoming request is added to the event data object using the parameter name with the prefix <code>x-pp-<\/code>:<\/p>\n<div style=\"aspect-ratio: 1416 \/ 488;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/x-pp-parameters.jpg\" title=\"x-pp-parameters\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"488\" width=\"1416\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/x-pp-parameters.jpg#ZgotmplZ\" alt=\"x-pp-parameters\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>For more details about these Piwik PRO-specific parameters, consult the <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/api\/http_api.html\">HTTP API documentation<\/a>.<\/p>\n<p>This event data can then be used to trigger supported tags, allowing you to orchestrate a complete data pipeline using the Piwik PRO JavaScript tracker as the starting point.<\/p>\n<h2 id=\"the-tag-template\">The tag template<\/h2>\n<p>The purpose of a <strong>Client<\/strong> in server-side Google Tag Manager is to <strong>claim<\/strong> an incoming HTTP request and (ideally) generate an <strong>event data object<\/strong> to trigger tags and populate them with data.<\/p>\n<p>Tags, on the other hand, are typically <em>request-agnostic<\/em>, which means that they <em>should<\/em> be configurable to work with the event data object generated by <strong>any<\/strong> Client.<\/p>\n<p>The Piwik PRO <strong>tag template<\/strong> has been designed to be as request-agnostic as possible, but it works best when coupled with a Piwik PRO Client.<\/p>\n<h3 id=\"how-to-install-the-tag-template\">How to install the tag template<\/h3>\n<p>The easiest way to install the tag template is to browse to <strong>Templates<\/strong> in the server-side Google Tag Manager container, and then click <strong>Search Gallery<\/strong> in the Tag Templates section.<\/p>\n<div style=\"aspect-ratio: 1840 \/ 560;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/search-gallery.jpg\" title=\"Search gallery\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"560\" width=\"1840\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/search-gallery.jpg#ZgotmplZ\" alt=\"Search gallery\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Here, you can search for <code>piwik pro<\/code>.<\/p>\n<div style=\"aspect-ratio: 1252 \/ 278;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-gallery.jpg\" title=\"Piwik PRO gallery\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"278\" width=\"1252\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-gallery.jpg#ZgotmplZ\" alt=\"Piwik PRO gallery\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<blockquote>\n<p><strong>Note!<\/strong> This is the <strong>official<\/strong> template by Piwik PRO. You might find other templates, too, but they have not been created by the Piwik PRO team. For most reliable results, I recommend you stick with the official templates.<\/p>\n<\/blockquote>\n<p>Once you locate the template, install it after reading and approving any prompts it throws your way.<\/p>\n<p>You can also install the tag template <strong>manually<\/strong> by first downloading the <a href=\"https:\/\/raw.githubusercontent.com\/PiwikPRO\/server-side-template-for-gtm-v2\/master\/template.tpl\">template.tpl file from Piwik PRO\u2019s GitHub repo<\/a>, and then following the <a href=\"#how-to-install-the-template\">same steps<\/a> as for the Client template.<\/p>\n<p>Once you\u2019ve installed it, browse to <strong>Tags<\/strong> in the server-side Google Tag Manager container, and click <strong>New<\/strong> to create a new tag. Choose the <strong>Piwik PRO<\/strong> template.<\/p>\n<div style=\"aspect-ratio: 1266 \/ 686;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-tag-type.jpg\" title=\"Piwik PRO Tag template\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"686\" width=\"1266\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-tag-type.jpg#ZgotmplZ\" alt=\"Piwik PRO Tag template\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Before we explore the template, let\u2019s walk through how the tag actually works.<\/p>\n<h3 id=\"how-the-tag-template-works\">How the tag template works<\/h3>\n<p>The purpose of the tag template is to compile an HTTP request to your Piwik PRO instance using the <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/api\/http_api.html\">Piwik PRO HTTP API<\/a>.<\/p>\n<p>Minimally, you need to enter your <strong>Account name<\/strong> (<code>myinstance.piwik.pro<\/code>) and your <a href=\"https:\/\/help.piwik.pro\/support\/questions\/find-website-id\/\"><strong>Site or App ID<\/strong><\/a>.<\/p>\n<p>You\u2019ll also need to add a <em>trigger<\/em> to the tag.<\/p>\n<blockquote>\n<p>If the tag is orchestrated to work with a specific Client, such as the Piwik PRO Client or the GA4 Client, it\u2019s a <strong>good practice<\/strong> to modify the trigger so that it only fires the tag when this Client has claimed the request, like this:<\/p>\n<\/blockquote>\n<div style=\"aspect-ratio: 1774 \/ 420;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-client-trigger.jpg\" title=\"Piwik PRO Client trigger\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"420\" width=\"1774\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-client-trigger.jpg#ZgotmplZ\" alt=\"Piwik PRO Client trigger\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>As for populating the necessary parameters for the outgoing request, you have <strong>three<\/strong> options with the tag template:<\/p>\n<ol>\n<li>Select <strong>Inherit from Client<\/strong> means that the field tries to grab the value directly from the <strong>event data object<\/strong> generated by the Client (<a href=\"#inherit-from-client\">more on this below<\/a>).<\/li>\n<li>Add or select a value by editing the tag field (you can use variables).<\/li>\n<li>Add any supported HTTP API parameter name and value to the <strong>Additional Parameters<\/strong> table in the tag (<a href=\"#additional-parameters\">more on this below<\/a>, too).<\/li>\n<\/ol>\n<p>Once the tag fires, it parses all the available fields and the values within to generate the outgoing request to your Piwik PRO instance.<\/p>\n<p>It will transparently forward the data generated by the Piwik PRO Client to your Piwik PRO instance.<\/p>\n<h3 id=\"integration-with-the-piwik-pro-client\">Integration with the Piwik PRO Client<\/h3>\n<p>If you are using the Piwik PRO JavaScript tracker or the Piwik PRO HTTP API to collect hits to server-side Google Tag Manager, you can get by with a <strong>minimal<\/strong> setup in server-side Google Tag Manager.<\/p>\n<p>This is because the Piwik PRO Client transparently forwards everything in the incoming request stream to the event data object, where the Piwik PRO tag then picks it up and sends to Piwik PRO servers.<\/p>\n<p>In this case, the Piwik PRO tag could look as simple as this:<\/p>\n<div style=\"aspect-ratio: 1778 \/ 1332;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-minimal-tag.jpg\" title=\"Piwik PRO minimal tag\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1332\" width=\"1778\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-minimal-tag.jpg#ZgotmplZ\" alt=\"Piwik PRO minimal tag\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The tag only has <strong>Account Name<\/strong> and <strong>Site or App ID<\/strong> populated, and it fires on a trigger for all events generated when <code>{{Client Name}}<\/code> <em>equals<\/em> <code>Piwik PRO Client<\/code>.<\/p>\n<h3 id=\"inherit-from-client\">\u201cInherit from Client\u201d<\/h3>\n<p>When you select <strong>Inherit from Client<\/strong> as the value of a tag field, the tag template looks at the <strong>event data object<\/strong> for the value relevant to that particular field.<\/p>\n<blockquote>\n<p>Note that the fields in the tag are the most frequently used configurations. They don\u2019t cover every single possible aspect of a Piwik PRO data stream. The template sources other parameters too, when necessary, and you can always use <a href=\"#transformations\">Transformations<\/a> and <a href=\"#additional-parameters\">Additional Parameters<\/a> to further configure the tracking.<\/p>\n<\/blockquote>\n<p>Here are the tag fields with the associated event data logic included.<\/p>\n<blockquote>\n<p>Remember that Piwik PRO-specific keys are prefixed with <code>x-pp-<\/code>, and the rest of the key name comes from the <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/api\/http_api.html\">HTTP API<\/a> parameter name.<\/p>\n<\/blockquote>\n<table>\n<thead>\n<tr>\n<th>Field name in the tag UI<\/th>\n<th>Event data key<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Anonymous Tracking<\/td>\n<td><code>x-pp-uia<\/code> and <code>x-pp-rmip<\/code><\/td>\n<\/tr>\n<tr>\n<td>Event URL<\/td>\n<td><code>page_location<\/code><\/td>\n<\/tr>\n<tr>\n<td>Referrer URL<\/td>\n<td><code>page_referrer<\/code><\/td>\n<\/tr>\n<tr>\n<td>Event (Action) Name<\/td>\n<td><code>x-pp-action_name<\/code> or <code>page_title<\/code><\/td>\n<\/tr>\n<tr>\n<td>Search Query<\/td>\n<td><code>x-pp-search<\/code><\/td>\n<\/tr>\n<tr>\n<td>Search Categories<\/td>\n<td><code>x-pp-search_cats<\/code><\/td>\n<\/tr>\n<tr>\n<td>Search Results Count<\/td>\n<td><code>x-pp-search_count<\/code><\/td>\n<\/tr>\n<tr>\n<td>External Link URL<\/td>\n<td><code>x-pp-link<\/code><\/td>\n<\/tr>\n<tr>\n<td>File Download URL<\/td>\n<td><code>x-pp-download<\/code><\/td>\n<\/tr>\n<tr>\n<td>Custom Event Category<\/td>\n<td><code>x-pp-e_c<\/code><\/td>\n<\/tr>\n<tr>\n<td>Custom Event Action<\/td>\n<td><code>x-pp-e_a<\/code><\/td>\n<\/tr>\n<tr>\n<td>Custom Event Name<\/td>\n<td><code>x-pp-e_n<\/code><\/td>\n<\/tr>\n<tr>\n<td>Custom Event Value<\/td>\n<td><code>x-pp-e_v<\/code><\/td>\n<\/tr>\n<tr>\n<td>Ecommerce Event Type<\/td>\n<td><code>x-pp-e_t<\/code><\/td>\n<\/tr>\n<tr>\n<td>Order ID<\/td>\n<td><code>x-pp-ec_id<\/code> or <code>transaction_id<\/code><\/td>\n<\/tr>\n<tr>\n<td>Revenue<\/td>\n<td><code>value<\/code><\/td>\n<\/tr>\n<tr>\n<td>Sub-total<\/td>\n<td><code>x-pp-ec_st<\/code><\/td>\n<\/tr>\n<tr>\n<td>Shipping<\/td>\n<td><code>x-pp-ec_sh<\/code><\/td>\n<\/tr>\n<tr>\n<td>Tax<\/td>\n<td><code>x-pp-ec_tx<\/code><\/td>\n<\/tr>\n<tr>\n<td>Discount<\/td>\n<td><code>x-pp-ec_dt<\/code><\/td>\n<\/tr>\n<tr>\n<td>Products<\/td>\n<td><code>x-pp-ec_products<\/code> or <code>items<\/code><\/td>\n<\/tr>\n<tr>\n<td>Visitor ID<\/td>\n<td><code>client_id<\/code><\/td>\n<\/tr>\n<tr>\n<td>User ID<\/td>\n<td><code>user_id<\/code><\/td>\n<\/tr>\n<tr>\n<td>Override User IP<\/td>\n<td><code>ip_override<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>If there is an <code>items<\/code> key in the event data object that is in the <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/ga4\/ecommerce?client_type=gtag#implementation\">GA4 format<\/a>, then it is <strong>automatically<\/strong> transformed to the format that Piwik PRO requires <code>ec_products<\/code> to be in.<\/p>\n<\/blockquote>\n<p>Additionally, the Tag automatically inherits these fields from the event data object:<\/p>\n<ul>\n<li><code>user_agent<\/code> is used to populate the <code>ua<\/code> parameter.<\/li>\n<li><code>language<\/code> is used to populate the <code>lang<\/code> parameter.<\/li>\n<li><code>screen_resolution<\/code> is used to populate the <code>res<\/code>parameter.<\/li>\n<\/ul>\n<p>So, if you want <strong>Inherit from Client<\/strong> to work, you need to make sure that the event data keys for the tag fields you are concerned about can be found in the event data object (<a href=\"#transformations\">see below<\/a> for tips on using Transformations).<\/p>\n<h3 id=\"custom-dimensions-and-custom-variables\">Custom dimensions and custom variables<\/h3>\n<p>Any custom dimensions (<code>x-pp-dimensionN<\/code>) in the event data object are automatically inherited by the tag, unless you override them with the Custom Dimensions table in the tag (or with Additional Parameters).<\/p>\n<div style=\"aspect-ratio: 1268 \/ 296;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/custom-dimensions.jpg\" title=\"Custom dimensions\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"296\" width=\"1268\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/custom-dimensions.jpg#ZgotmplZ\" alt=\"Custom dimensions\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>In the example above, custom dimension with index number <code>6<\/code> has been overridden by the tag field. Any <em>other<\/em> custom dimensions present in the event data object are included automatically.<\/p>\n<p>Custom variables work a bit differently. If you add even a <strong>single<\/strong> custom variable to the tag, then nothing else is inherited from the event data object. In that case, only the variables added to the tag are considered.<\/p>\n<p>If you do not edit the custom variables in the tag, then the event data key <code>x-pp-cvar<\/code> is used for event-scoped custom variables, and <code>x-pp-_cvar<\/code> is used for session-scoped custom variables.<\/p>\n<div style=\"aspect-ratio: 1278 \/ 532;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/custom-variables.jpg\" title=\"Custom variables\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"532\" width=\"1278\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/custom-variables.jpg#ZgotmplZ\" alt=\"Custom variables\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>In the example above, the only <strong>event-scoped<\/strong> custom variable that is sent is the one with index <code>1<\/code>, <em>even if<\/em> there are additional event-scoped custom variables in the event data object. All session-scoped custom variables in the event data object are sent with the request to Piwik PRO.<\/p>\n<h3 id=\"transformations\">Transformations<\/h3>\n<p>In case the event data object is not in the correct format or it\u2019s missing certain keys that you need your tag fields to inherit, you can apply a <a href=\"https:\/\/www.simoahava.com\/analytics\/transformations-server-side-google-tag-manager\/\">Transformation<\/a> to add or augment the Piwik PRO key in the event data object.<\/p>\n<p>It\u2019s a good practice to make sure the Transformation only applies to Piwik PRO tags.<\/p>\n<div style=\"aspect-ratio: 1844 \/ 1264;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/transformations-example-for-template-guide.jpg\" title=\"Transformations example\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1264\" width=\"1844\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/transformations-example-for-template-guide.jpg#ZgotmplZ\" alt=\"Transformations example\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>For example, the Transformation above adds the <code>x-pp-rec<\/code> key with the value <code>1<\/code> to the event data object, and it automatically populates the <code>x-pp-e_t<\/code> (Event Type) key based on the GA4 event name.<\/p>\n<p>Read <a href=\"https:\/\/www.simoahava.com\/analytics\/ga4-to-piwik-pro-using-server-side-google-tag-manager\/\">this article<\/a> for a more elaborate example of how to use a Transformation like this to support a real-world use case.<\/p>\n<h3 id=\"additional-parameters\">Additional Parameters<\/h3>\n<p>In the <strong>Additional Parameters<\/strong> section of the tag, you can add any supported <a href=\"https:\/\/developers.piwik.pro\/en\/latest\/data_collection\/api\/http_api.html\">HTTP API parameters<\/a> to the tag.<\/p>\n<blockquote>\n<p>Remember to use the <strong>HTTP API<\/strong> parameter name directly, and <strong>don\u2019t<\/strong> add the <code>x-pp-<\/code> prefix.<\/p>\n<\/blockquote>\n<div style=\"aspect-ratio: 1326 \/ 526;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/additional-parameters-added.jpg\" title=\"Additional parameters added\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"526\" width=\"1326\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/additional-parameters-added.jpg#ZgotmplZ\" alt=\"Additional parameters added\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Anything you add to Additional Parameters will override <strong>any<\/strong> other considerations done by the tag. So even if the tag inherits from the Client, or even if you\u2019ve added a value directly to a tag field, the keys in Additional Parameters will take precedence.<\/p>\n<h3 id=\"priority-for-value-resolution\">Priority for value resolution<\/h3>\n<p>The <strong>priority<\/strong> order of how parameters are populated into the Piwik PRO request is:<\/p>\n<ol>\n<li>If the parameter has been defined in Additional Parameters, use it.<\/li>\n<li>Else if the parameter has been added into a tag field (and has a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Truthy\">truthy<\/a> value), use it.<\/li>\n<li>Else if the parameter is available in the event data object, use it.<\/li>\n<\/ol>\n<p>Thus if you want to <strong>unset<\/strong> a value that\u2019s present in a tag field or in the event data object, the easiest way is to use Additional Parameters and make sure the value is set to <code>undefined<\/code> or <code>null<\/code>, such as with the <strong>Undefined Value<\/strong> variable type available in server-side GTM.<\/p>\n<h3 id=\"preview-the-tag\">Preview the tag<\/h3>\n<p>When you enable Preview mode in server-side Google Tag Manager, the Piwik PRO tag writes <strong>two<\/strong> log entries into the Console tab for any given event.<\/p>\n<div style=\"aspect-ratio: 2410 \/ 480;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-tag-console.jpg\" title=\"Piwik PRO tag console\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"480\" width=\"2410\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2024\/07\/piwik-pro-tag-console.jpg#ZgotmplZ\" alt=\"Piwik PRO tag console\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The first is the <strong>Compiled request body<\/strong>, which is the <strong>JSON<\/strong> data including all the parameters configured for the outgoing request. If you don\u2019t see some parameter here, it\u2019s not sent to Piwik PRO.<\/p>\n<p>The second is the <strong>Encoded POST body<\/strong>, which is the URL-encoded request body that is shipped to your Piwik PRO instance. This is what Piwik PRO servers ultimately receive. If it looks good here, it will most likely look good in Piwik PRO.<\/p>\n<blockquote>\n<p>However, always remember to use the <a href=\"https:\/\/help.piwik.pro\/support\/collecting-data\/tracker-debugger\/\"><strong>Tracker Debugger<\/strong><\/a> to verify the data stream \u2013 <em>that<\/em> is the ultimate truth.<\/p>\n<\/blockquote>\n<p>Use Preview mode to ascertain that the SGTM pipeline works.<\/p>\n<blockquote>\n<p>The logging is <em>only<\/em> available in Preview mode. In a Live container, nothing is logged to <code>stdout<\/code>.<\/p>\n<\/blockquote>\n<h2 id=\"summary\">Summary<\/h2>\n<p>This article is a <strong>technical<\/strong> overview of how the Client and tag templates work.<\/p>\n<p>For a more practical approach, don\u2019t forget to read my other <a href=\"https:\/\/www.simoahava.com\/analytics\/ga4-to-piwik-pro-using-server-side-google-tag-manager\/\">article on how to utilize the GA4 data stream to mutate a request flow to Piwik PRO<\/a>.<\/p>\n<p>Custom templates in Google Tag Manager are open-source projects. I encourage you to participate in the Client and tag template development work by submitting Issues.<\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2-client\/\">The GitHub repo for the Client template<\/a>. Direct link to <a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2-client\/issues\">Issues<\/a>.<\/li>\n<li><a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2\/\">The GitHub repo for the tag template<\/a>. Direct link to <a href=\"https:\/\/github.com\/PiwikPRO\/server-side-template-for-gtm-v2\/issues\">Issues<\/a>.<\/li>\n<\/ol>\n<p>There are lots of further development ideas going through my mind, ranging from a <strong>better integration with Google Analytics 4<\/strong> to <strong>more granular control over custom variable overrides<\/strong>.<\/p>\n<p>The success of template development for GTM is directly correlated with the strength of the community around the vendor\u2019s services. In this, I believe, Piwik PRO is very well positioned. With the help of <a href=\"https:\/\/community.piwik.pro\/\">Piwik PRO\u2019s amazing community<\/a>, these templates will surely become benchmarks for all other vendors\u2019 template development work.<\/p>\n<p>Please let me know in the comments if you have questions about these templates!<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Piwik PRO has two new server-side Google Tag Manager templates, and this article explains what they are and how they work. The first template, Piwik PRO Client, is designed to work in unison with the Piwik PRO HTTP API. Most often these requests are generated by the Piwik PRO JavaScript tracker, but theoretically any HTTP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":29713,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[1531,14495,18474,1190,18475,1791,11455],"dealstore":[],"offerexpiration":[],"class_list":["post-29712","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-google","tag-manager","tag-piwik","tag-pro","tag-serverside","tag-tag","tag-templates"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New Piwik PRO Templates In Server-side Google Tag Manager - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=29712\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New Piwik PRO Templates In Server-side Google Tag Manager - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Piwik PRO has two new server-side Google Tag Manager templates, and this article explains what they are and how they work. The first template, Piwik PRO Client, is designed to work in unison with the Piwik PRO HTTP API. Most often these requests are generated by the Piwik PRO JavaScript tracker, but theoretically any HTTP [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=29712\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-15T22:24:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=29712#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=29712\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"New Piwik PRO Templates In Server-side Google Tag Manager\",\"datePublished\":\"2025-01-15T22:24:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=29712\"},\"wordCount\":2682,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=29712#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg\",\"keywords\":[\"Google\",\"Manager\",\"Piwik\",\"Pro\",\"Serverside\",\"TAG\",\"Templates\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=29712#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=29712\",\"url\":\"https:\/\/fivemor.com\/?p=29712\",\"name\":\"New Piwik PRO Templates In Server-side Google Tag Manager - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=29712#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=29712#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg\",\"datePublished\":\"2025-01-15T22:24:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=29712#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=29712\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=29712#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=29712#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New Piwik PRO Templates In Server-side Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New Piwik PRO Templates In Server-side Google Tag Manager - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=29712","og_locale":"en_US","og_type":"article","og_title":"New Piwik PRO Templates In Server-side Google Tag Manager - Som2ny Network","og_description":"Piwik PRO has two new server-side Google Tag Manager templates, and this article explains what they are and how they work. The first template, Piwik PRO Client, is designed to work in unison with the Piwik PRO HTTP API. Most often these requests are generated by the Piwik PRO JavaScript tracker, but theoretically any HTTP [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=29712","og_site_name":"Som2ny Network","article_published_time":"2025-01-15T22:24:56+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=29712#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=29712"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"New Piwik PRO Templates In Server-side Google Tag Manager","datePublished":"2025-01-15T22:24:56+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=29712"},"wordCount":2682,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=29712#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg","keywords":["Google","Manager","Piwik","Pro","Serverside","TAG","Templates"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=29712#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=29712","url":"https:\/\/fivemor.com\/?p=29712","name":"New Piwik PRO Templates In Server-side Google Tag Manager - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=29712#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=29712#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg","datePublished":"2025-01-15T22:24:56+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=29712#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=29712"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=29712#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/01\/new-piwik-pro-templates-in-server-side-google-tag-manager.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=29712#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"New Piwik PRO Templates In Server-side Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/29712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29712"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/29712\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/29713"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29712"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=29712"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=29712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}