Support » Plugin: Google Analytics Dashboard for WP by ExactMetrics (formerly GADWP) » Use GADWP in my own reporting plugin

  • Resolved snapalot

    (@snapalot)


    Hi guys

    I’m building a reporting plugin for my own use that creates a CSV file with a list of posts queried with WP_Query. I want to display GA page views and users for each post, as well as reach on Facebook.

    Can I use the functionality of your plugin (to fetch the stats from GA) inside my plugin? I don’t want to reinvent the wheel.

    The CSV I’m generating currently has the following content. I want to add pageviews, users and facebook like so:

    Date,Author,Title,Permalink,Pageviews,Users,Facebook

    Would it be best to query all the posts’ stats on GA with one query, or should I query each post’s stats on its own inside the for loop? The amount of posts returned by WP_query could be thousands.

    Best
    -K

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author chriscct7

    (@chriscct7)

    We enforce API limits on our app and check this every day to prevent abuse. If you exceed those limits you will not be able to receive reports for a duration depending on the number you exceed by. Continued or excessive use will result in permenant removal.

    I would strongly recommend building your own integration using the php API so that you can both monitor your usage but also gain a lot more ability to query.

    You should in any case utilize the maximum limit of 5000 posts per query. Google will not allow you to run hundreds much less thousands of individual queries.

    -Chris

    • This reply was modified 8 months, 1 week ago by  chriscct7.

    Thanks Chris
    -K

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use GADWP in my own reporting plugin’ is closed to new replies.