{"id":24854,"date":"2018-07-09T13:57:28","date_gmt":"2018-07-09T11:57:28","guid":{"rendered":"https:\/\/www.exoclick.com\/api-masterclass-1-data-collection\/"},"modified":"2018-07-09T15:18:53","modified_gmt":"2018-07-09T13:18:53","slug":"api-masterclass-1-data-collection","status":"publish","type":"post","link":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/","title":{"rendered":"API Masterclass #1: Data Collection"},"content":{"rendered":"<p>If you have never used ExoClick\u2019s 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\u00a0<a href=\"https:\/\/drive.google.com\/open?id=1OPmcXU9RFZ6RxNH5F_VPgw9_dMwBGJeDYCdv80U-oWI\" target=\"_blank\" rel=\"noopener\"><strong>spreadsheet<\/strong><\/a>\u00a0which you must <b>copy\u00a0<\/b>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.<\/p>\n<p>&nbsp;<\/p>\n<p>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 <strong>Tools<\/strong> menu and select <strong>Script Editor<\/strong>. See the two screenshots below:<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-24845\" src=\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2018\/07\/2.jpg\" alt=\"\" width=\"959\" height=\"829\" \/><\/p>\n<p>Fig 1. Script editor access<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-24846\" src=\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2018\/07\/code.jpg\" alt=\"\" width=\"1167\" height=\"830\" \/><\/p>\n<p>Fig 2. Script code &#8211; Texts in brown explain what each part of the code does.<\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>In order to use ExoClick\u2019s 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.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-24807\" src=\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2018\/07\/token3.jpg\" alt=\"\" width=\"1005\" height=\"335\" \/><\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>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.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-24847\" src=\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2018\/07\/1.jpg\" alt=\"\" width=\"894\" height=\"728\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 3<\/strong><br \/>\nAdd the CID in the campaign field. This will allow the system to identify which campaign you want to request and pull the data from.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 4<\/strong><br \/>\nNow 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.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 5<\/strong><br \/>\nNow you can filter your results by cost using \u2018ascending\u2019 or \u2018descending\u2019 modes by clicking on the Field Order by [asc-dec]:<\/p>\n<p>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..<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 6<\/strong><br \/>\nThen simply click on the Generate Data button on the spreadsheet and the data will be displayed.<\/p>\n<p>&nbsp;<\/p>\n<p>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.<br \/>\nHappy APIing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.<\/p>\n","protected":false},"author":20,"featured_media":24786,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[94,152],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.4 (Yoast SEO v19.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>API Masterclass #1: Data Collection - ExoClick<\/title>\n<meta name=\"description\" content=\"In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"API Masterclass #1: Data Collection\" \/>\n<meta property=\"og:description\" content=\"In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\" \/>\n<meta property=\"og:site_name\" content=\"ExoClick\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-09T11:57:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-07-09T13:18:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2018\/07\/API-Master-Class.png\" \/>\n\t<meta property=\"og:image:width\" content=\"810\" \/>\n\t<meta property=\"og:image:height\" content=\"430\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Juanma Cortes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juanma Cortes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\"},\"author\":{\"name\":\"Juanma Cortes\",\"@id\":\"https:\/\/www.exoclick.com\/#\/schema\/person\/86c17743ee91b9d52e7b648e03a56168\"},\"headline\":\"API Masterclass #1: Data Collection\",\"datePublished\":\"2018-07-09T11:57:28+00:00\",\"dateModified\":\"2018-07-09T13:18:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\"},\"wordCount\":487,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.exoclick.com\/#organization\"},\"articleSection\":[\"API\",\"Tutorial\"],\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\",\"url\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\",\"name\":\"API Masterclass #1: Data Collection - ExoClick\",\"isPartOf\":{\"@id\":\"https:\/\/www.exoclick.com\/#website\"},\"datePublished\":\"2018-07-09T11:57:28+00:00\",\"dateModified\":\"2018-07-09T13:18:53+00:00\",\"description\":\"In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.exoclick.com\/pt-pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Masterclass #1: Data Collection\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.exoclick.com\/#website\",\"url\":\"https:\/\/www.exoclick.com\/\",\"name\":\"ExoClick\",\"description\":\"The innovative ad network\",\"publisher\":{\"@id\":\"https:\/\/www.exoclick.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.exoclick.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.exoclick.com\/#organization\",\"name\":\"ExoClick\",\"url\":\"https:\/\/www.exoclick.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/www.exoclick.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2015\/04\/exoclick_new_baseline.png\",\"contentUrl\":\"https:\/\/www.exoclick.com\/wp-content\/uploads\/2015\/04\/exoclick_new_baseline.png\",\"width\":1500,\"height\":613,\"caption\":\"ExoClick\"},\"image\":{\"@id\":\"https:\/\/www.exoclick.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.exoclick.com\/#\/schema\/person\/86c17743ee91b9d52e7b648e03a56168\",\"name\":\"Juanma Cortes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/www.exoclick.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.exoclick.com\/wp-content\/uploads\/cache\/2017\/10\/juanma-small\/392160680.jpg\",\"contentUrl\":\"https:\/\/www.exoclick.com\/wp-content\/uploads\/cache\/2017\/10\/juanma-small\/392160680.jpg\",\"caption\":\"Juanma Cortes\"},\"description\":\"Head of Technical Support\",\"url\":\"https:\/\/www.exoclick.com\/pt-pt\/author\/juanma-cortes\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"API Masterclass #1: Data Collection - ExoClick","description":"In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/","og_locale":"pt_PT","og_type":"article","og_title":"API Masterclass #1: Data Collection","og_description":"In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.","og_url":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/","og_site_name":"ExoClick","article_published_time":"2018-07-09T11:57:28+00:00","article_modified_time":"2018-07-09T13:18:53+00:00","og_image":[{"width":810,"height":430,"url":"https:\/\/www.exoclick.com\/wp-content\/uploads\/2018\/07\/API-Master-Class.png","type":"image\/png"}],"author":"Juanma Cortes","twitter_misc":{"Written by":"Juanma Cortes","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#article","isPartOf":{"@id":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/"},"author":{"name":"Juanma Cortes","@id":"https:\/\/www.exoclick.com\/#\/schema\/person\/86c17743ee91b9d52e7b648e03a56168"},"headline":"API Masterclass #1: Data Collection","datePublished":"2018-07-09T11:57:28+00:00","dateModified":"2018-07-09T13:18:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/"},"wordCount":487,"commentCount":0,"publisher":{"@id":"https:\/\/www.exoclick.com\/#organization"},"articleSection":["API","Tutorial"],"inLanguage":"pt-PT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/","url":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/","name":"API Masterclass #1: Data Collection - ExoClick","isPartOf":{"@id":"https:\/\/www.exoclick.com\/#website"},"datePublished":"2018-07-09T11:57:28+00:00","dateModified":"2018-07-09T13:18:53+00:00","description":"In part one of this three part series we show you how easy it is to start using our platform API. This first part is all about Data Collection.","breadcrumb":{"@id":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.exoclick.com\/pt-pt\/api-masterclass-1-data-collection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.exoclick.com\/pt-pt\/"},{"@type":"ListItem","position":2,"name":"API Masterclass #1: Data Collection"}]},{"@type":"WebSite","@id":"https:\/\/www.exoclick.com\/#website","url":"https:\/\/www.exoclick.com\/","name":"ExoClick","description":"The innovative ad network","publisher":{"@id":"https:\/\/www.exoclick.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.exoclick.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-PT"},{"@type":"Organization","@id":"https:\/\/www.exoclick.com\/#organization","name":"ExoClick","url":"https:\/\/www.exoclick.com\/","logo":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.exoclick.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.exoclick.com\/wp-content\/uploads\/2015\/04\/exoclick_new_baseline.png","contentUrl":"https:\/\/www.exoclick.com\/wp-content\/uploads\/2015\/04\/exoclick_new_baseline.png","width":1500,"height":613,"caption":"ExoClick"},"image":{"@id":"https:\/\/www.exoclick.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.exoclick.com\/#\/schema\/person\/86c17743ee91b9d52e7b648e03a56168","name":"Juanma Cortes","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.exoclick.com\/#\/schema\/person\/image\/","url":"https:\/\/www.exoclick.com\/wp-content\/uploads\/cache\/2017\/10\/juanma-small\/392160680.jpg","contentUrl":"https:\/\/www.exoclick.com\/wp-content\/uploads\/cache\/2017\/10\/juanma-small\/392160680.jpg","caption":"Juanma Cortes"},"description":"Head of Technical Support","url":"https:\/\/www.exoclick.com\/pt-pt\/author\/juanma-cortes\/"}]}},"_links":{"self":[{"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/posts\/24854"}],"collection":[{"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/comments?post=24854"}],"version-history":[{"count":2,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/posts\/24854\/revisions"}],"predecessor-version":[{"id":24871,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/posts\/24854\/revisions\/24871"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/media\/24786"}],"wp:attachment":[{"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/media?parent=24854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/categories?post=24854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exoclick.com\/pt-pt\/wp-json\/wp\/v2\/tags?post=24854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}