Link the server container to the web container?

Hi, I’m looking to install the FB conversion api on my Wix site. However, I can only put one GTM id. So I am thinking of linking my server container to my web container so that the data is linked together.

Do you know how to do this? Or do you have another solution for me?

Thanks in advance :slight_smile:

Hi Sophie,

You do not need to embed your server container into site code.

The ‘linking’ happens via you sending events from your WEB container to your SERVER container and handling those as needed.

I strongly recommend you go over our Blog - Stape and read up on server-side in general to get a bit more comfortable with the concept.

Kind regards,
Dan

Hi Dan,

Thanks for your answer, do you know how to send the data from the web container to the server container?

If I understand correctly, I leave the web container linked to my site, and I need to create a link between my two containers?

I will check the stape blog to see if there is already the article I am looking for time.

Thank you very much,

Sophie

Sophie,

There is no “linking” per se.

There’s a thing called Transport URL, essentially that’s and address of your server container. You will need to set up tags that will push relevant events to that URL, as well configure server container to handle receipt of those events before sending them to tracking platforms.

Hi, I think I have managed to create a link between my two containers thanks to this video.

Link to the video : Sending data from the GTM web container to the server container using Data Tag/Data Client - YouTube

However, I notice a problem in my data where I read “not defined”.

I have put variables of type “Cookie value” in the FB API developed by Stape. Did I get the data type wrong?

Thank you in advance for your help!

Capture 0|647x500

What your screenshot shows is that the variable you’ve put into the tag are undefined, so:

  • it’s either that variables are wrong
  • or there was nothing to pull from the aforementioned cookie

Thank you very much for your answer.

So I understand that the variables are not defined as it is before the data is inserted (check out initiation). However, the product id is not taken into account while adding an item to the cart.

I also modified and changed the “Store: None” to “Store Cookies” on the web container side. Is this what I should do?

I found a page on the stape site that uses GA4 for FB API setup, but since I am using the Data Tag Client, do I have to use GA4?

Link: How to Setup Facebook Conversion API + Events Deduplication & Hash User Data

To summarize my situation, the server container is set up, the link between the two containers is linked, I only have my variable problem left…

Thanks in advance for your help!

  • you dont need to use GA4, I mean to say that you could but that has nothing to do with your issue
  • ‘Store’ parameter will save to either cookie and/or local storage. It’s hard to comment if your setup calls for that
  • so yes, you need to make sure that data is available to your variables at the point in time when corresponding tag fires

Ok, so as I have successfully linked my two containers with similar variables, I don’t need GA4?

Ok!, but I still have to choose between Cookie or Local Storage to keep track of my data when transmitting data?

Website >>> GTM web >>> GTM server >>> FB API

Do you know how I can check if the data is available for my variables when the corresponding tag is triggered?

As you can see on the screen, I don’t see the content of the variable, but the name…

Thanks in advance

Do I have to activate the tag once via the preview for the data to show up on the FB Business Manager? Because I have activated my checkout tag, but not purchase. I can see that data is coming back for the checkout, but not for the other event, even though the settings are the same and both tags are online.

  • when in preview mode, once you open a fired tag you can switch between names/values in the top right corner
  • when in preview, there’s a tab called ‘variables’ - you can see which have value on a relevant event (one you trigger on)
  • not sure what you mean by ‘activated’ if you container workspace is published then all properly set tags will fire and send data to FB Event Manager

I didn’t understand the first point? Where exactly is the top right corner? Can you take a screenshot to show me what you are talking about? Thanks

For the variable tab, I found it, but as I already told you the majority are undefined…

Thank you, I thought I had to put the fired tag in the preview mode so that the data would be sent directly to the FB Business Manager.

  1. see screenshot:

  1. I can’t help with why they are undefined, just pointing you to where you could accurately check the values. High level, there are two reasons: either there is no data where you’re trying to pull it from OR you’re referencing it wrong

  2. There’s a submit button in your container, until you submit (i.e. deploy) your container setup, your tags will only work in preview mode and not on live site.

When I press “Value”, I always see undefined…

What do you mean by “you reference them wrong”? Is it the property name? the property value? something else?

Thanks

Sophie, those variables are either not set (there’s no such fields/keys/parameters at the time of event occurrence) or you accessing them wrong (your variable may have typos, wrong keys etc)