Support » Plugin: Slimstat Analytics » Shortcode Help

  • Resolved chenryahts

    (@chenryahts)


    I’ve read through the documentation, but I’m stuck on this line,

    resource: permalink of the page accessed on your site – please use this keyword instead of post_link, when filtering by resource

    How would I filter by the resource url or by page id?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jason Crouse

    (@coolmann)

    Hi,

    you can use the word “resource” for the URL, and “content_id” for PAGE ID. “post_link” cannot be used in filters, but only as a value in the “w” parameter of the shortcode. In other words you can have

    [slimstat f='count' w='post_link']....

    but not

    [slimstat f='count' w='id']post_link contains flowers[/slimstat]

    This last shortcode needs to be written as

    [slimstat f='count' w='id']resource contains flowers[/slimstat]

    I could give you the long explanation on why this is the case, but just accept it for what it is 🙂

    Best,
    Jason

    Okay, so I have:

    [slimstat f="count" w="id"]content_id equals $post_id[/slimstat] which successfully returns the stats for a single page,

    but I’m trying to get the count for a outbound link, and my best guess is:

    [slimstat f="count" w="outbound_resource"]contains $outbound_url[/slimstat]

    Both variables have values, so I think I’m screwing up the syntax somewhere.

    Is there a way to get the count for the number of times an outbound_link has been clicked?

    • This reply was modified 3 years, 10 months ago by chenryahts. Reason: syntax
    • This reply was modified 3 years, 10 months ago by chenryahts. Reason: syntax

    Nevermind! Got it:

    [slimstat f="count" w="id"]outbound_resource contains $url[/slimstat]

    Plugin Author Jason Crouse

    (@coolmann)

    Great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcode Help’ is closed to new replies.