Closed pietschy closed 10 years ago
Pull request welcome if you'd like to add/set an options parameter (https://github.com/CardinalPath/gas/blob/master/src/plugins/youtube.js#L16) and get it into core. Until then, overriding the _trackEvent hook is your best bet.
Either that or doing your own build and modifying the label here: https://github.com/CardinalPath/gas/blob/master/src/plugins/youtube.js#L36
Hi all,
Is there a way for me to provide a label other than the youtube url? Ideally I'd like to get the label from a data attribute if possible.
I initially tried adding a hook for you tube events as follows but to no avail:
I though of using the _trackEvent hook but that'd get a bit ugly with switches on the category and I'm not sure how I could get to the iframe data attributes.
Other than that it looks like the only option would be to add a some kind of hook to the _ytStateChange function that can use the
event['target']
to return a different label.Any help greatly appreciated. Cheers