Geozo Native Ads
That's the feedback of our advertiser published on Trustpilot.com. Test and see for yourself! Sign up now

Guide Effortlessly Sync Adsterra Stats with Google Sheets: A Complete Automation Guide

MGID Contest

affrabby

Grand Guru
Joined
Sep 28, 2018
Messages
487
Here's a full guide on how to connect Adsterra API with Google Sheets using my script. This guide will walk you through the steps to automate data fetching from Adsterra API and displaying it in Google Sheets.

Step-by-Step Guide:​

1. Set Up a Google Sheet

  1. Create a new Google Sheet:
    • Open Google Sheets, and create a new spreadsheet.
    • Name the sheet something relevant, like "Adsterra Stats."
  2. Add Headers to Your Sheet:
    • In the first row, add headers to the columns for the data you'll be collecting.For example:
      • A1: Placement Sub ID
      • B1: Impressions
      • C1: CPM
      • D1: Revenue
      • E1: Clicks
      • F1: CTR
      • G1: Date
    • This will serve as the data table where stats from the Adsterra API will populate.

2. Open Google Apps Script

  1. Go to the Script Editor:
    • In your Google Sheet, click on Extensions → Apps Script to open the Google Apps Script editor.
  2. Add the Script:
    • Copy and paste the script into the editor. Here is the full script, Don't forget to add your API :
    • javascript

      Code:
      function getAdsterraDailyStats() {
      const apiKey = "XXXXXXXXXXXXXXXXXXXXXXXXX";  // Your API key
      const sheet =
 
Last edited:
To view the premium content in our affiliate marketing forum (including this awesome thread), you must first register and upgrade your account. Register today and become a part of our amazing community!
Top