• Resolved galinaivvn

    (@galinaivvn)


    Hi,
    I had the same question before 8 months and I resolved it, but now with new version there are different files and a lot of differences. Now I’m using WP v.4.9.4 and WP Popular Posts v4.0.13. I copy my previous question:

    I’m using WP popular posts to show the number of post views on my news site and also use Facebook Instant Articles for our facebook visitors.
    Is there a way to multiply by 2 the number of views of a post, because our organic traffic and FIA traffic is almost the same? For example – one post has 35 vies on site and 35 on FIA, and I want our visitors on site to see that this post has 70 views.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @galinaivvn,

    The code is mostly the same, it just got reorganized. I’m guessing this is what you’re looking for.

    Thread Starter galinaivvn

    (@galinaivvn)

    Hi,
    I think so, but I’ve changed row 199 and 212 with this:
    ON DUPLICATE KEY UPDATE pageviews = pageviews + %4\$d, last_viewed = '%3\$s';",

    but on previous version it works, now doesn’t.

    Plugin Author Hector Cabrera

    (@hcabrera)

    It’s easier to just change:

    $views = ( $this->admin_options['tools']['sampling']['active'] )
              ? $this->admin_options['tools']['sampling']['rate']
              : 1;

    into:

    $views = 2;

    That way, you don’t need to mess with the query directly.

    Thread Starter galinaivvn

    (@galinaivvn)

    Hi,
    Is that mean that views will multiply by 2?

    My idea to change views is the following: one post is viewed 1000 times on site and approximately double (2000) in Facebook Instant Articles. The task is to show about 3000 views in site.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yep: 1 * 2 = 2 ??

    Thread Starter galinaivvn

    (@galinaivvn)

    Thank you!
    It’s so more easier than previous version! I will try it right know.

    Thread Starter galinaivvn

    (@galinaivvn)

    Hi,
    My ticket is not resolved.
    Your solution doesn’t work. I changed
    $views = ( $this->admin_options[‘tools’][‘sampling’][‘active’] )
    ? $this->admin_options[‘tools’][‘sampling’][‘rate’]
    : 1;

    to this: $views = 2;
    and my views on site are 120, on IA are 130 and plugin shows 4.
    Something is not ok

    Plugin Author Hector Cabrera

    (@hcabrera)

    Can’t help unless you share some more details, @galinaivvn. Saying “it doesn’t work” without further information from you isn’t really helpful.

    Let’s start by sharing your site’s URL so I can have a look.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Increase the number of post views’ is closed to new replies.