Anup Gupta
Anup Gupta

Reputation: 103

How to add google analytics on practo(external website button) button

Practo provides : <practo:abs_widget widget="**********"></practo:abs_widget> need to add google analytics when user will click on button.

Upvotes: 0

Views: 94

Answers (1)

AbA2L
AbA2L

Reputation: 110

you have this solution:

<div class="call-wrapper-middle">
    <button href="/show/phonenumber-middle" onclick="__gaTracker('send', 'event', 'buttons', 'click', 'phone-number-middle');" target="blank" id="call-phone-middle" style="display: none;"><i class="fa fa-phone"></i>Call us</button>
    <div class="call-number-middle" style="display: block;"> <a href="tel:555" class="number">555</a></div>
</div>

The doc: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

The source: Track button click as goal in Google Analytics

Upvotes: 1

Related Questions