Support » Plugin: Call Now Button » Add tracking for “Google Analytics for WordPress by MonsterInsights” plugin

  • Resolved netconsulting

    (@netconsulting)


    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 standard ga.

    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.

    • This topic was modified 1 year ago by  netconsulting. Reason: Changed line for first change from 178 to 183
Viewing 1 replies (of 1 total)
  • Plugin Author Jerry G. Rietveld

    (@jgrietveld)

    Hi there,

    Thanks for your message and the suggestion. You’re the first person to have suggested this integration. I’ll add it to my backlog and will add this option to a future update.

    The opening hours is already on that list. I can’t give you an exact date on this, but it’s coming.

    Cheers,
    Jerry

Viewing 1 replies (of 1 total)
  • The topic ‘Add tracking for “Google Analytics for WordPress by MonsterInsights” plugin’ is closed to new replies.