Analytics
6.9K members online now
6.9K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

How to Add Event Tracking to Weebly Website

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello!

 

I was wondering what needs to be done to implement event tracking in Weebly. I already have Google Analytics set up in my website, but we want to know what internal links are being clicked throughout the site. Besides normal links to other pages, we also have a few pages where people can click a few categories and be jumped down the page to that information. So, we would want to know what categories are being clicked to know what's popular with the site visitors. Can anyone help me figure out how to see this data? I talked to Weebly, and they didn't know what to do. Thanks!

 

Haylee

1 Expert replyverified_user

How to Add Event Tracking to Weebly Website

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Haylee, 

 

You can setup event tracking with the on-click method (on links).

 

Here is a link example in html utilizing the on-click method of event tracking: 
<a href=”/downloads/whitepapers/seo-is-great.pdf” onClick=”_gaq.push([‘_trackEvent’, ‘whitepaper’, ‘download’, ‘SEO is great’, 5, true]);” target=”_blank”>SEO Is Great Whitepaper</a>

 

More information here: 

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

https://www.koozai.com/blog/analytics/the-complete-google-analytics-event-tracking-guide-plus-10-ama...

 

How to Add Event Tracking to Weebly Website

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Adam -

Thanks for getting back to me. Would your method work with how our links are currently? Check out this page for an example: http://www.benchmarktechnologygroup.com/check-scanners.html. We have the links on the left that jump them down the page to where that info is. How would we use your method to track which ones they are clicking? And also does that method work for the PDFs as well? Thanks!

 

How to Add Event Tracking to Weebly Website

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Have you figured out how to add event tracking to your site?  I need to add it to my site as well.  Also, what weebly template did you use?  I like the look of your site.

 

Thanks,

Chris

How to Add Event Tracking to Weebly Website

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi Chris! I never figured out how to track the PDF clicks, but I did figure out how to track the #links I added to the check scanner and printer pages. It shows up now in Google Analytics.

 

I added this piece in the header to track those clicks in Google Analytics:

<script type="text/javascript">
jQuery(document).ready(function () {
    jQuery('.menu a').click(function(){
        var match = jQuery(this).attr('href').match(/#\S+/);
        ga('send', 'pageview', location.pathname + match[0]);
    });
});
</script>

 

The theme I used is Aroma. Thanks for liking my site!

How to Add Event Tracking to Weebly Website

Top Contributor
# 6
Top Contributor

To track events such as pdf downloads you can add the following code directly to a link (this is for universal analytics.js syntax)

eg <a href="/downloads/whitepapers/seo-is-great.pdf" onClick="ga('send', 'event', ‘whitepaper’, ‘download’, ‘SEO is great’, { nonInteraction: true });" target="_blank">SEO Is Great Whitepaper</a>

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

How to Add Event Tracking to Weebly Website

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Where do I put that link in if it's not associated with a piece of text? Check out this page to see how our PDFs display: http://www.benchmarktechnologygroup.com/printers.html.

How to Add Event Tracking to Weebly Website

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Hello BenchmarkTechGroup,

 

I am having the same question and issue with implementing event tracking to a weebly website. I own the following website: BlessedCreationsbyYG. At the top on the banner and at the bottom of the home page I have a "Plan Your Next Event" button and a "Contact Us Today" button, both with lead to the Contact Page. Do you know how to configure events for something like this?

 

I am currently using UTM parameters in order to track whether or not someone has clicked a link on the page.