API Masterclass #1: Data Collection

If you have never used ExoClick’s platform API this series of three blog posts will show you how to fetch and update data from our platform to help you analyse and optimise and automate campaigns, utilising examples from this spreadsheet which you must copy to your Google Drive. The aim is for you as an advertiser to use the examples to get you started using the API and then later, when you feel more confident you can start creating your own examples and tasks.

 

Use the spreadsheet to help you fetch the data. All of the API coding is done using Google script language, so when you open the spreadsheet simply go to the Tools menu and select Script Editor. See the two screenshots below:

Fig 1. Script editor access

 

Fig 2. Script code – Texts in brown explain what each part of the code does.

 

In part 1 of this series we will show you a Data Collection example. This allows you to filter the cost of your spend per country. The purpose is to help you see how your top 10 countries are performing in order to optimise your campaign in those GEOs. Or analyse the bottom 10 countries so you can block underperforming countries. This way you can see which of those countries are more profitable for your campaign.

 

Step 1

In order to use ExoClick’s API you must set a Session Token. To set a token, you must have a valid account with the required username and password. The API Token creation is available from the API tab within the Admin Panel.

Step 2

Copy the spread sheet to your personal Google Drive and open the sheet. Here you will see that you can fetch a campaigns data for impressions, CTR and cost: filtered by country.

 

Step 3
Add the CID in the campaign field. This will allow the system to identify which campaign you want to request and pull the data from.

 

Step 4
Now set the date parameters by adding them into the date fields (Date from, Date to). This will establish the period from which you wish to request the data.

 

Step 5
Now you can filter your results by cost using ‘ascending’ or ‘descending’ modes by clicking on the Field Order by [asc-dec]:

Additionally, you can select how many countries you wish to pull data from and display by inserting a number value in the Limit field, the spreadsheet says 10 for 10 countries but you can change this value for however many countries you wish to get data from..

 

Step 6
Then simply click on the Generate Data button on the spreadsheet and the data will be displayed.

 

Do you have an idea for this Data Collection example that could be used for another type of filtering? Why not email us at help@exoclick.com. Please put as the subject email title: API Ideas.
Happy APIing!

Juanma Cortes