I am trying to implement cross domain tracking and send data to one site ID in PP as well as sending data to a different site ID as per the structure here.
In Analytics debug events come in but I get javascript errors. Is it a problem to run two containers on the same website. GA has no trouble with multiple scripts. I assume I just don’t understand how PP does multiple scripts and how to debug. Single scripts work just fine. I humbly ask for advice.
As far as I can tell, the solution in the article evaluates the hostname and chooses a PP ID based on which hostname is present. Maybe I don’t get the support article, but I don’t think this covers my case.
I want PP on the exact same hostname to send data to two different PP IDs. One ID is for the roll-up, and the other one is for the individual site (hostname, if you will). I.e. all domains will have ID1. So, for instance, example-a.com will have ID1 and ID2, example-b.com will have ID1 and ID3, example-c.com will have ID1 and ID4, and so on.
I am running two different PP container scripts on the same domain, as described above. I do get data into the PP roll-up, but I get javascript errors and I don’t see the tag manager debug working.
The idea is to fire two different containers and send the same data to each. The two requests for containers work, the first two in the list. It appears that only one ppms.php request is triggered. Why don’t two ppms.php calls get sent? One for each container? Doesn’t PP support multiple containers like GA does? If PP does, is there a config that I haven’t used?
Here are two clips, where the two containers fire as expected. There is only one ppms.php request, and it seems to arbitrarily fire based on one or the other container.
I have no idea why two containers should be needed but however: two instances of PP might be the problem because they are using the same command queue and that could be the reason for your troubles. If so, one container would have to switch to the alternative namespace… maybe that helps? If my assumption is correct, you can compare cour problem to using PP and Matomo at the same time anf this the same fix could apply here as well. Can I use Piwik PRO and Matomo at the same time? | Piwik PRO help center
AFAIK there is no option to use _ppas instead of _paq, so you might need to deactivate all PP standard tags in one container and use costom html tags instead. But I am not sure about that.
Hi, I seem to be a bit closer by using the addTracker method. I now see two ppms.php calls, but they both get 404. The payloads look good. Do you have any idea about why they get 404? The URLs are correct.
Well, it was a clumsy attempt to anonymize the post. You can see the correct URL in the clip below that calls the …a1cd66837a7.js file.
.
This is a URL copied from a different installation script in the same account. https://norgesgruppen.containers.piwik.pro is correctly collecting data today.
This file should contain the content of your Piwik PRO Tag Manager container (stuff like tags and so on).
The https://norgesgruppen.piwik.pro/ppms.php endpoint is responsible for data collection and this is what we want to use in the addTracker method.
So something like _paq.push([“addTracker”, “https://norgesgruppen.piwik.pro/ppms.php”, “6cde5751-4441-4a1c-aae5-da1cd6”]); should do the trick when it comes to adding a second tracker.
By the way, if you want me to anonymize some stuff from this post - send me a private message.
So, now I know how to send the same data to two places, which is great learning. However, my need is to have separate sets of tags on the same page, like you can in GTM.
That would mean calling two different containers on the same page. Is that possible?
My use case is that I need a “roll-up” to do crossdomain tracking for the login sequence. That involves many sites, but there is only need for a couple of tags.
Each site has other needs that should be taken care of for each of them. The only cross domain need is login.
Using GA this would be simple as you can run multiple GTM containers on one site, sending data of your choice to different GA4 properties.
This seems to be very complicated with PP. Or is it something that I am missing?
No, this use case is the opposite of what I seek. I.e., separate tags for two different endpoints.
The only way to do this afaik by now, is the Meta Sites&Apps in Analytics, where you can see all included data if you implement the relevant tags on all sites. Still, this does not support cross-domain tracking, which I am looking for. I would have wanted to see the sessionised use of the single-sign-on solution for some 15 different websites, where tags would only be used to collect login data to and from SSO.
It seems to me that the PP strategy of combining Analytics and Tag Manager in one code base at the same time does not support different tracking needs on the same page as GTM and GA do.
I do like PP’s integrated simplicity, but I think this is a drawback.
Well, the meta setup allows you to have separate tags on a single site because on the PPTM UI level you kind of have 2 different containers. They are later (when published) joined together in a single tag tree but I’m not sure if that’s a problem.
What I usually do in case there’s a need for both specific views (seperate sites/domain) and a cross-domain tracking view is create a single tracking code containing 2 addTracker methods. One for the separate site and one for the cross-domain one.
I have tried both having a single Piwik PRO Tag Manager container for all of the websites and using a meta setup to keep the separate containers and deploy the “double tracker” on each of those websites with ease. The second method allows you to keep all of the tags that need the per site separation and deploy additional tags on top of that. There’s a short description of this method here.
I usually stick to running a single tracking code when splitting traffic into 2 different sites but you could try keeping all of the default tracking tags and adding the cross-domain tracker through the meta setup. This is not something I’ve tried but I think it could address the tracking tag separation need.
Using custom code is for sure more complicated than using UI to configure stuff like this but it’s still possible. Maybe I’m missing the point here but the attached image from your opening post looks very similar to what I’m describing above.
I think I get it now. If I build my Login tag on the meta-level and specify a standardized dataLayer across sites for login events, can I get login activity from all involved sites while each has a separate set of tags in their respective Sites?
That would solve the absolute number of login events across sites, as I understand it, but without CDT?
In a way, it sounds like what I am after, but if you look at my intended setup here, the Script with ID 1 is, in effect, the tags in the Meta Sites&Apps. While Scripts ID 2 - 5 would be the actual scripts for each site?
No, cross-domain tracking still has to be enabled for one of the trackers (looks like Script w/ ID 1 in your case).
I think we should take a little step back just to make sure that we are on the same page here. We have to split up the Piwik PRO tracking code from the Piwik PRO container code. They are not tied to eachother permamently - you can use the TM without the tracking code and the tracking code without TM (e.g. embedding tracking in the source code, using a different tag manager).
The setup that I was talking about should look like this:
By default, if there are 2 trackers on the website and you e.g. use a custom event template in Piwik PRO Tag Manager, both of the trackers will receive the event. You can specify which site you want to send the custom event to using custom HTML tag.