[Google Analytics Plugin] Missing two handy wrappers

[Google Analytics Plugin] Missing two handy wrappers

  
Forge Component
(7)
Published on 2017-10-26 by Experts
7 votes
Published on 2017-10-26 by Experts

Hi guys,

there are two missing wrappers that are handy:

//To get a specific variable using this key list https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters:
//for example to get campaign name:
window.ga.getVar('cn', function(result){ console.log(result);})

//To set a specific variable using this key list https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters:
//for example to set session control:
window.ga.setVar('sc', 'end', function(result){ console.log(result);})

I know I can extend and call this with js blocks (and I've done it) but would be nice to have this already in the plugin, and also 

CheckGoogleAnalyticsPlugin

could be changed to public.


Cheers,
Miguel

Miguel 'Kelter' Antunes, thanks for your feedback, this has been added on the latest version (2.1.0).


Cheers,

João Gonçalves