Git Product home page Git Product logo

microsoftadsr's Introduction

MicrosoftAdsR

Microsoft Advertising Report

Introduction

This project was created to call the microsoft ads api and download the report programmatically given Mcirosoft's lack of functionality and options in terms of report delivery.

At the moment this downloads the file into a CSV but could easily be adjusted to load the data into a data frame if needed.

Open to any suggestions on how to improve - it's by no means a finished or polished solution but it's been working for 12 months now with no issues!

Pre-Requisites

The use the MicrosoftAdsR package you will need to have access to Microsoft Ads and you will need to know the Client ID, Client Secret and the API Developer Token.

Acknowledgement

The basis of this project came from the RBingsAds package by Deepesh Goel.

microsoftadsr's People

Contributors

ps1982 avatar

Stargazers

 avatar

microsoftadsr's Issues

getReportId / Authentication - Error in xmlParse(node) : empty or no content specified

Hi, I'm trying to use your package, but I have an error message when I run the code you see below (which is based on your sample code).

The error message is:

Error in xmlParse(node) : empty or no content specified

###For authorization and access token###
credentials <- list(
  client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  developer_token = "xxxxxxxxxxxxxxxx",
  customer_id = "xxxxxxxxxxxxx",
  download_location = "C:\\xxxxxxxxxxxxxxxxx",
  filename = "bing_%s_%s_%s_%s_.zip",  #reportid followed by startdate followed by enddate
  startDate = format.Date(Sys.Date() - 7, "%Y-%m-%d"),
  endDate = format.Date(Sys.Date() - 1, "%Y-%m-%d")
)
credentials <- Authentication(credentials)

accounts <- 'xxxxxxxxxxxx'

report <- "KeywordPerformanceReportRequest"
columns <- c("AccountName", "CampaignName", "Impressions", "Clicks", "Spend")

reportId <- getReportId(credentials, report, columns, startDate, endDate)
downloadUrl <- getDownloadUrl(credentials, reportId)
df <- getDataFromURL(downloadUrl)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.