[Resolved] Add Tracking Code to the Button
I tried inserting the google analytics onclick tracking in this file “author-hreview/include/review_template.php” and it has caused my website to crash.
I guess this is because the onclick script is java and the file is php so they don’t work together.
Does anyone have a solution this problem?
Hesham could you plz fix this problem?
Please, don’t edit the plugin core files. Instead, try using a plugin like Google Analytics for WordPress which I think will help.
I’m already using the google analytics plugin but I’m trying to add onclick event tracking and this can only be done by adding the code manually to each end every link.
do you have an idea how to do that with your plugin?
I am not sure why it’s not working for you. It’s working for me, try inspecting the button code of this review to see it by yourself:
I think you are missing a setting or need to reconfigure the plugin properly.
I can see it’s working in the link you gave, but I still don’t understand where should I add the tracking code?
Is this functions is only supported in the pro version?
It has nothing to do with the Author hReview plugin, it’s all can be done within the “Google Analytics for WordPress plugin”, so please read more about how to properly setup that plugin.
Hesham, you were right, I finally got it to work 🙂
I was using a simple google analytics plugin that did not offer this function. but after trying Yoast’s plugin I see that it sets up the event tracking automatically, thus solving the problem.
The only downside is that it chooses the ‘Category’ and ‘Action’ for you and does not insert a ‘Label’ parameter as well, but it’s better than not having tracking at all.
Thanks Hesham, problem solved.
- The topic ‘[Resolved] Add Tracking Code to the Button’ is closed to new replies.