Hello!
We’re wanting to integrate Google Analytics content grouping in our blog and I’m looking for the best possible method for dropping in a snippet that calls ga() on page load.
Example:
ga('set', 'contentGroup3', 'My Group Name');
We’re using the integrated Google Analytics option in our blog (eg. via Settings > Website > Pages > Tracking integrations
So using that - I don’t think ga() is readily available because it goes through _hsp (I tried calling ga(function() {}) and ga is undefined.
These are two ideas that I had in mind:
1. Rip out GA from the Tracking integrations and put it as a footer snippet customization - we will probably lose a lot of the things that are connected to the integration option so this doesn’t feel like the right thing to do
2. setTimeout() - ugly and not guaranteed
Are there other options? Like is there something that I could call via _hsp?
TIA for the help!