Root domain and subdomains each with their own FB pixels setup

I am brand new to GTM. I have setup two web containers and 1 server container in GTM.

  • One web container is for mydomain
  • The second web container is for sub.mydomain
  • The FB pixel tags in each container are set up to use different pixel ids. I am using the Adsmurai template
  • On the server container I have two clients, one for each pixel. They are setup to allow only mydomain and sub.mydomain respectively
  • I have two separate CAPI tags, each one triggered by checking the pixel id.

When I run the Tag server preview it works fine for the root page but when I go to the subdomain page the Main client handles the request because the pixel id of the incoming request is for the root domain.

Maybe it is a problem with the Adsmurai template since they recently deprecated the custom server option.

Has anyone done what I am trying to accomplish?

Does it make any sense to use different Adsamurai clients here? I have no experience in setting up Adsamurai, but usually one client is used and the tagging level determines the job of where to send what depending on the pyaload of the incoming hit.

Thanks for the comment. I was finally able to get it to work once I watched and read some more to understand how it all works together.

It turned out to be a problem with the Adsmurai Client code. I modified the JS code to use the head tag ‘Referer’ value to compare with the list of allowed domains that you setup in their template. Now the correct client handles the incoming requests.

1 Like