Bounteous-Inc / youtube-google-analytics

YouTube Google Analytics Embed Tracking
MIT License
232 stars 89 forks source link

Feature Request: Named Trackers #47

Open n00bium opened 6 years ago

n00bium commented 6 years ago

Hi,

I noticed that the Plugin does not support named Trackers. In my setup I need to track with mutliple Tracking Codes.

e.g. ga('create', 'UA-XXXXXXXX-1', 'auto',{'name': 'Tracker00'}); ga('Tracker00.set', 'anonymizeIp', true); ga('Tracker00.send', 'pageview'); ga('create', 'UA-XXXXXXXX-2', 'auto',{'name': 'Tracker01'}); ga('Tracker01.set', 'anonymizeIp', true); ga('Tracker01.send', 'pageview');

The Script seemingly does not support that. I am getting in to work to add the Name to the unminified JS in line 388. But that is not Ideal.

Update: I found the property datalayername, but that should be for GTM, right?