一辈子只做好两件事,就可以变得很富有,投资长期有价值的事情,规避无效之事——查理芒格

Fri 07 Nov 2025
40 views

This is the time when we are really fast at adopting the Web3 browsers. With a growing number of users globally adopting the iOS operating system. Ad blockers in their browsers. As a result, our ability to track user activity is being significantly impacted, as these technologies are highly effective at blocking third-party cookies. Server-Side Explanation.

To solve the problem, we have to complete the server-side for our Pinterest conversion tracking. Before we completed the Pinterest conversion tracking on the browser side. Now it will be through a first-party server. Pinterest Conversion Tracking.

To complete the process of sending data to the server, we have to start work from the GTM web container. Because from here we will send all of the data to our server through the GA4 tag. So let’s start it.

Sending Data from web to server Through GTM

As for the browser-side tracking, we will complete the server-side tag. Because here also we will just cover the e-commerce tracking. But you can do anything as per your need, like the same way. 

First go to your tag section in the GTM and create a new tag, but at the time, as the tag type, select “Google Tag” as your tag type.

This tag will work as your first Pinterest tag to place your base code in your site, but here we don’t have to add the Pinterest tag ID.

Here in the tag ID we place the GA4 measurement ID, not Pinterest. Because we are using the GA4 tag templates, so yes, we have to use their ID. But if you don’t have it, create one new GA4 or just place here one random number in the same.

Now here in the “Configuration Parameter” place we are adding three parameters. You can remember that in the browser-side tracking we didn’t use any single parameter. But here on the server side we have to do it.

Event_time: In tracking and analytics, event_time refers to the timestamp indicating when a specific event (like a page view, button click, or purchase) occurred. This timestamp is critical for accurately recording the exact time an event took place, allowing you to analyze trends, behaviors, and performance over time.

To create this variable, first go to your variable section and create a new variable from the user-defined variable. Select “Custom JavaScript” as your trigger type. Then paste the code and save the variable to use it here.

function() {

  return Math.round(new Date().getTime() / 1000);

}

Now through the last parameters, we are going to use the server URL. Through this URL your data will be sent to the server. Be careful in the time of writing the parameter’s name; do it in our way. 

Now it’s time to set up the trigger, so to do it, scroll down and select “All Pages” as your trigger type because this tag should work on every page.

Page Visit

Now we have to create one more new tag for the page visit. To do this again, go to your “Tag” section in GTM. Create a new tag, but at this time select this new tag type.

After selecting the tag type, now let’s start the setup of the page visit.

After selecting the tag in the “Measurement ID,” we place the same measurement ID, and in the “Event Name” place, we place the event name. Here in the time we are working to set up the “page visit,” but we have to remember that we are sending this data through GA4, so at the time we have to follow the GA4 schema. Because GA4 called “view_item” every time after viewing one product, not “page visit.” 

But don’t worry, from the server, when we send the data to Pinterest, these things will be fixed as per Pinterest rules through the Pinterest API.  

Now it’s time to set up the important parameters. To do it, scroll down and click on the “Event Parameters.”

For the Pinterest server-side conversion tracking, we will have to send these 3 parameters. Here with this all-new event, data about our viewed product, like the items array, currency, and total product value. Pinterest Conversion Tracking.

Here for all these parameters, you can use the same variable you used in your browser-side tracking. You just have to change the parameter name. 

Now set up the trigger for this new tag. 

Add To Cart

In the same way, you can create a new tag for the “AddToCart” events.

You just have to change the trigger for “AddToCart” according to the data layer.

Checkout

Now this is the final event that we have to send to the server. The tracking way is also the same for this tag, but here for this event we have to send some more new parameters. With all of these new parameters, we will have to send some user info also. We will get all this info after completing one purchase in the data layer.

In this way, you will be able to see your customer email in the data layer, so we have to send the values to Pinterest. But we have to use the hash value to send it to Pinterest.

Here you can see our selected parameters; all these events were created as per our data layer rules. In the same way, we followed in the browser-side tracking.

Now complete the trigger section as per your data layer.

De-Duplication with Event ID

In GTM, an event ID is commonly a unique identifier for some event that happens on your website or app when a person interacts with it. This ID is used to log and identify events on the site so that the correct data can be associated with it in analytics systems (e.g., Google Analytics, Pinterest Pixel).

We have used the event ID for deduplication. Because in one place we are sending data in two different ways. One browser is client-side, and the other one is server-side. So if we don’t send the event ID with the event, then our platform will start counting every piece of data as new data. That’s why we have to send the event ID with every event.

To set up the event ID with the event, first we have to add one more new template in our GTM. So to do it, go to your variable section and create a new variable from the user-defined variable. 

Here to select the variable type, we have to discover new variables.

So from here, select search and select the Event ID variable template. Now after adding the new templates in the variable section, you can use it as your variable type.

Event ID variable creation is now done. So again, go to your tag section because now we have to set this variable with every single tag. Let’s start it with the Pinterest tag templates.

In every Pinterest template, you can add this under the “Line Items.” In the same way, set up the event ID for every single tag. 

Now again you have to set up this variable in your GA4 tag. Because with this tag you are sending data to your server. So here also it’s important to have the event ID.

Here in the GA4 tag you can send this event_id simply like this with the other parameters. Server-Side Explanation.

Great, your GTM web container is now ready to send data to your server, and in previous time we already completed our server container setup, so the server container is also ready to get data through the GA4 client in the server container. 

GTM Server Container Setup

This is the view of your server container. Here you can see the GA4 (Web) client.

The server container client in Google Tag Manager (GTM) is responsible for capturing the data coming from the browser container. When a website user interacts, data such as page views or events is collected by the browser container and then sent to the server container through HTTP requests. The client of the server container processes that data, does any transformation/enrichment as necessary, and logs it to analytics platforms such as Google Analytics or Pinterest. This server-side method helps in increasing performance, avoiding overhead on the browser, and also supporting more secure data handling to track it accurately.

To check that your server container is working perfectly, first click on the preview section from the server container.

This is your first view after opening the preview from the server container. Now go to your GTM web container and create a new preview and do some events on your site.

Here you can see how we are getting data from the server in our server container. So we can send this through the API to our site.

To do it first, you have to add one tag template in your server container like the previous way.

Now go back to the tags section and create a new tag, and as the tag type, select the recently added Pinterest API.

This is the view of your Pinterest API. Here to complete the setup, we have to collect two things. one “Advertiser ID” and the 2nd “API Access Token.”  

To get this, all we have to do is go back again to our Pinterest conversion setting. 

Here in the button click to get the access token and the ID you can see in the red mark. So use it.

Great, now we just have to set up the trigger. So go to your trigger section.

Now in the trigger, select “Custom” as the type, then select “Some Events.” Then you can see in the next first position we select “Event Name” in the next “Matches RegEx” and in the other place “page_view|view_item|add_to_cart|purchase.” You can also do it for your trigger setup.  

By using “Matches RegEx” in the trigger configuration, you can set up a custom trigger in GTM to track multiple events. You can allow the trigger to match particular event names using a regular expression (RegEx) by choosing “Matches RegEx” after entering “Event Name” in the first dropdown.

You enter “page_view|view_item|add_to_cart|purchase” in the second field. This regular expression instructs GTM to start up whenever any of these things take place. Because the | symbol is used to separate the various event names, this trigger will activate for any of these events, enabling you to record actions at every stage of the customer journey, from page viewing to purchase.

But in the first place, if you find that the “Event Name” is missing, then go to your variables section, and from the built-in variables, select the “Event Name,” and you’re done.

So with this, your Server API setup is now done. This server API will collect every single important piece of data as per Pinterest rules, and it will send it to Pinterest. 

To check if it is working perfectly or not, you can run one more preview. After the preview, you can publish both of your containers. 

Great, well done, we complete the setup. But our journey isn’t finished. Stay with us and share with us your thoughts.

本网站所有内容资源全部免费,将会持续更新在跨境电商运营中所有你遇到的问题,掌握本网站所有内容你即可无敌!

您也可以扫描左侧二维码关注我们的微信公众号,持续关注我们的动态,不管你是找工作以及自运营都将会让你受益匪浅。

Share it on social media

Ohab

我专注于数字营销、网络分析和转化跟踪,帮助企业通过数据驱动的策略和洞察力推动增长。
(0)

暂无评论

Leave a Reply

关注微信公众号

添加微信加入粉丝群

加入星球

关键词

热门文章

最新文章

分类