Support » Plugins » AddToAny and Google Analytics

  • Hi there,

    I installed AddtoAny share button in my blog, and works fine.

    Do you use this button? Do you like it? Do you track it from Google Analytics?

    I can’t get tracking the events of AddToAny in GA.

    It seems that the instructions there are different from the instructions in WP, I mean, I copied this code into my index.php:

    <?php if( function_exists(‘ADDTOANY_SHARE_SAVE_KIT’) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>

    from WP instructions:

    And someone has just suggested me that I should use this code in order to track this event on GA:

    <a class="a2a_dd" href="">
        <img src="" border="0" alt="Share"/>
    <span id="events_demo"></span>
    <script type="text/javascript">
    // A custom "onReady" handler for AddToAny
    function my_addtoany_onready() {
        events_demo.innerHTML = 'AddToAny menu is ready!';
    // A custom "onShare" handler for AddToAny
    function my_addtoany_onshare(data) {
        events_demo.innerHTML = 'Shared &quot;<a href="'
            + data.url
            + '">'
            + data.title
            + '</a>&quot; to '
            + data.service
            + '!';
    // Setup AddToAny "onReady" and "onShare" callback functions
    var a2a_config = {
        tracking_callback: {
            ready: my_addtoany_onready,
            share: my_addtoany_onshare

    Ops! I don’t know how to match the special code for WP with this code.

    It’s required to track the button …

    How can help me, please?

    Do you use this button? Do you like it?

  • The topic ‘AddToAny and Google Analytics’ is closed to new replies.