- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Is This Possible... Track Clicks
Is This Possible... Track Clicks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
Is it possible to track the number of times my users are clicking on various buttons on my site.
I want to track the clicks and not the url that the buttons link to... because some of these buttons don't have a url behind them, they simple load a pop up or some other UX.
Any advice on how to implent this for ALL pages and not a split version of a page would be greatly appreciated.
Re: Is This Possible... Track Clicks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
this is not possible within optimizely if you want to get an absolute value. If you just want to know, if someone clicked a button or not you can use specific click goals for each button or a group of buttons.
Another weired approach can be custom events for each absolute value ( "clicked once, twice,..."), count the number of clicks in a cookie and fire the custom events after increasing the click value. But, as mentioned, it is as weired as trying to do this via google analytics.
What is your idea behind the test, why is the absolute number of clicks interesting?
Kind regards
Michael
Michael




Re: Is This Possible... Track Clicks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Re: Is This Possible... Track Clicks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Thank you for your reply.
I don't need to know the number of times each user clicks it... i just want to count the total number for all users.
Lets say i want to introduce a new feature called 'Print Page', i would like to be able to add a new 'Print Page' button to my site and then gauge how many people clicked this before i actually build the feature.
I don't want to split test this, i just want to roll this out to all users.
Re: Is This Possible... Track Clicks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Yes, this is possible.
In your case, you can create the element dynamically (check out the code from this post: https://blog.optimizely.com/2013/09/12/how-to-add-a-lightbox-to-an-experiment/), and append it to the same section of each page. Once you have the button(s) you want on every page, you can create a custom goal that pushes an event each time a visitor clicks on one of the buttons.
Let's say you want to track the clicks on the first instance of an element with a class of newElement, you would have something like this in your variation code:
var newElement = document.getElementsByClassName('newElement'[0]); newElement.addEventListener('click', function(){ window['optimizely'] = window['optimizely'] || []; window.optimizely.push(["trackEvent", "newElementClick"]); } });
Next, you'll want to create this event as a goal in your experiment's goal section. Notice how the callback of the event listener pushes a new event into Optimizely which will populate with your results.


Re: Is This Possible... Track Clicks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
If you feel like your question was answered, would you mind accepting a response as a solution? This will help other folks who have a question similar to yours!
Thank you!
