Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am new to Drupal. I have added AddtoAny module for one of my tasks and it is working perfect. Thanks to Developer.
I want to track the links given in the module like Facebook, Gmail, Twitter etc. How do I do that? I have researched and came to know that it is already implemented in the code and has been given in the AddtoAny API. As I am new to Drupal, so I don't know how and where do I make changes?
Could anyone help me regarding this in steps?
Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#3 | Google Analytics Tracking Code.JPG | 76.69 KB | Yet Another User |
Comments
Comment #1
Yet Another User CreditAttribution: Yet Another User commentedWhere (Which file and section) can I include code given in these links?
http://www.addtoany.com/buttons/customize/events
http://www.addtoany.com/buttons/customize/link_tracking
Thanks.
Comment #2
micropat CreditAttribution: micropat commentedIf you're using Google Analytics already, tracking clicks (shares) is completely automatic. Here is how to access sharing stats within Google Analytics:
http://www.addtoany.com/ext/google_analytics/
If you'd like to enable "click-back" tracking (which tracks each visit to your site from a shared link) for certain social networks, go to your AddToAny settings in Drupal admin, then add one of the following blocks of code into the Additional Options box:
Adds Google Analytics parameters to shared links, for "click-back" tracking:
a2a_config.track_links = 'ga';
Uses a bit.ly short URL for shared links, for "click-back" tracking:
For bit.ly, replace
addtoany|R_4ed7bcc558a86d04901bfae7c3a20bb5
with[your bit.ly username]|[your bit.ly key]
Other click-back tracking options (including custom URLs) are documented here: http://www.addtoany.com/buttons/customize/link_tracking
Comment #3
Yet Another User CreditAttribution: Yet Another User commentedDear Micropat,
Thanks for your reply. I have closed the issue as it is working and will reopen it if necessary. It is working but still it is showing that Event Tracking is not installed on my machine. Please check the attachment.
Thanks for your time.
Comment #4
micropat CreditAttribution: micropat commentedFor this to work, it is a prerequisite that you already have Google Analytics installed on your site. Perhaps install the Google Analytics module?
After you have Google Analytics installed, AddToAny sharing stats will be automatically sent to your Google Analytics. Hopefully this clarifies, Mohit. Cheers.