Add tracking for “Google Analytics for WordPress by MonsterInsights” plugin
-
Hi there,
It would be great if you could add support to track the event also with the “Google Analytics for WordPress by MonsterInsights” plugin. Unfortunately this plugin uses its own tracker function
__gaTracker
instead of the standardga
.You would need to add some lines to call-now-button.php:
Add on line 183 (version 0.3.2 of the plugin):
<div class="radio-item"> <input id="tracking5" type="radio" name="cnb[tracking]" value="4" <?php checked('4', $cnb_options['tracking']); ?> /> <label for="tracking5">Google Universal Analytics (analytics.js) __gaTracker by Google Analytics para WordPress por MonsterInsights</label> </div>
Add on line 329 (version 0.3.2 of the plugin):
} elseif($alloptions['tracking'] == '4') { // for analytics.js by Google Analytics para WordPress por MonsterInsights $tracking = "onclick=\"__gaTracker('send', 'event', 'Contact', 'Call Now Button', 'Phone');\"";
It would be great if you could add it directly to the plugin so that we don’t have to add it manually on each update.
By the way it would be great if you could develop (in JavaScript so that it works with cache plugins) the funcionality: “Only show on opening hours / times“.
Thanks for your work.
- The topic ‘Add tracking for “Google Analytics for WordPress by MonsterInsights” plugin’ is closed to new replies.