The whole point of the mini plugin is to add an _additional_ tracking code, not to replace the Site Kit one. So this behavior with both firing is entirely expected.
It sounds like you want to disable the Site Kit tracking for stories, is that right?
Got it. In that case, since the Site Kit analytics code is controlled/printed by Site Kit itself, you’d need to check if/how it allows disabling its output.
Right now I don’t see an easy way for that in its code because it hooks into Web Stories with a closure and doesn’t provide a good filter. So it seems like you have three options:
- Ask Site Kit support for a good option to disable the output, maybe filing a feature request.
- Hook into
web_stories_print_analytics early, find Site Kit’s closure and try to remove that manually. Maybe with something like Object Hooks Remover
- Hook into the
googlesitekit_amp_gtag_opt filter and modify Site Kit’s GA config to simply remove your GA ID, basically rendering its tag useless.
As you can see, SK doesn’t make it easy (at least at first glance), so best reach out to them for assistance.
You can also create a view in the sitekit GA property that excludes /web-stories/ URLs
@swissspidy totally follow you!
But I do think something changed. Before only the mini plugin’s UA’s code loaded.
Something changed in in mid december…bounce rate dropped way down which tells us there’s a dual GA tracking Bounce Rate on Web Stories Property.
I’ll reach out to the SK team. I’ll use filters for now. When I have a working fix, I’ll post to this for anyone else who needs something.