ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Entry view tracking adding 5 counts at one time

September 06, 2011 3:37pm

Subscribe [2]
  • #1 / Sep 06, 2011 3:37pm

    Varen

    150 posts

    This question may be related to a resolved thread.


    I’m experiencing a problem with entry views tracking adding 5 counts for each single view. I’m creating a crude flagging system to allow users to report dead links. There is an ajax link on an entry page with a ajax response page which has a single tag on it, see examples below.

    The page with an ajax link:

    {exp:channel:entries}
    ......stuff
    <div class="toolbar">
    Posted: {entry_date format="%d %M %Y"} | 
    <span><a href="http://{permalink=directory/flag}" class="load_link">Report Dead Link</a></span>{if member_group == '1'} | Reports: {view_count_one}{/if}
    </div>
    
    [removed]
    (function($) {  
    $(function() {
                 $('.load_link').click(function() {
                 $(this).closest('span').load(this.href);
               return false;
         });
    });
    })(jQuery);
    [removed]

    {/exp:channel:entries}

    The response template:

    <html>
    <body>
    
    {exp:channel:entries channel="directory" limit="1" track_views="one"}Thanks for the report!{/exp:channel:entries}
    
    </body>
    </html>

    As you can see, it couldn’t be a simpler setup and yet each time I click on a “Report Dead Link” link the count is increased by a factor of “5”.

    Any ideas on why this could be happening? In a previous thread with a similar problem none of the answers applied to my code.

    Thanks

  • #2 / Sep 06, 2011 5:11pm

    Varen

    150 posts

    I just realized that my thread was started in the wrong forum. This is an EE2 issue and should have been started in the EE2 support forum. Would a moderator please move it there.

    My system is EE 2.2.1 on a development server.

  • #3 / Sep 07, 2011 1:21am

    Dan Decker

    7338 posts

    Hi Peter,

    Which of the templates is using the entry views tracking? Or are you referring to the template hit counter in Template Manager?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases