Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Baden

    (@baden03)

    yes… how much do you know about event tracking?

    Thread Starter Raesgo

    (@raesgo)

    Thanks for the reply.
    Not to much unfortunately but I’m capable. Is there any resources you could point me to or any instruction that you could pass on?

    Would be greatly appreciated.

    Thanks

    Thread Starter Raesgo

    (@raesgo)

    A little bit more info for you. Below is the current code i have in place,

    <div id="1"><img class="aligncenter size-full wp-image-1872" src="xxxxxxxxxxxxxx.jpg" alt="" /></div>
    <div>[print-me target="#1"]</div>

    which opens my coupon image in a new window for the user to print which is great. We are hoping to track each click to print. And I am assuming we use the universal code. just not sure where to insert it.

    onClick=”ga(‘send’, ‘event’, ‘ category’, ‘action’, ‘label’);”>

    Thanks again for any help.

    Plugin Author Baden

    (@baden03)

    ok, step one is you need to fully understand what kind of event tracking you want.
    What do you expect to see on your GA reports, exactly?
    Again, here is a link all about Google Analytics Event Tracking:
    https://developers.google.com/analytics/devguides/collection/analyticsjs/events

    You might be able to do it adding the onclick event, but this would be a bit hacky. A better way would be to inject javascript into the footer of your template like so:

    <script>
    jQuery(document).ready(function() {
    	jQuery(document).on('click', '.tracky_mc_trackface', function(event) {
                  ga('send', 'event', {
                       eventCategory: 'Print-O-Matic',
                       eventAction: 'print',
                       eventLabel: event.target.id
                  });
           });
    });
    </script>

    and then add the special tracking class to your print-o.matic shortcode:

    [print-me target="#1" class="tracky_mc_trackface"/]

    Tell you what. If you are intrested, we’ll put togher a demo for you, and see if we can add an easy way for you to add the tracking as a new feature of print-pro-matic.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘tracking a [print-me target=""] with google analytics’ is closed to new replies.