GithubHelp home page GithubHelp logo

isabella232 / bing-ads-reporting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forward3d/bing-ads-reporting

0.0 0.0 0.0 109 KB

Gem for pulling reports from bing ads

License: MIT License

Ruby 99.11% Shell 0.89%

bing-ads-reporting's Introduction

Bing Ads Reports

Installation

gem install bing-ads-reporting

Usage

Initializing service.

All Reporting Service - Bing Ads Reference for Reporting Service

service = BingAdsReporting::ReportingService.new({
  developerToken: '',
  applicationToken: '',
  authenticationToken: '',
  :accountId: '',
  customerId: ''})

Bulk Service - Bing Ads API reference for Bulk Service

service = BingAdsReporting::BulkService.new({
  developerToken: '',
  applicationToken: '',
  authenticationToken: '',
  :accountId: '',
  customerId: ''
})

Create report and get it's ID

Reporting Service

period = Datebox::Period.new('2013-07-01', '2013-07-03')
id = service.generate_report({report_type: 'KeywordPerformance',
                              report_format: 'Tsv',
                              aggregation: 'Daily',
                              aggregation_period: 'ReportAggregation::Daily',
                              columns: %w[AccountId AccountName CampaignId CampaignName AdGroupId AdGroupName KeywordId Keyword DestinationUrl DeliveredMatchType AverageCpc CurrentMaxCpc AdDistribution CurrencyCode Impressions Clicks Ctr CostPerConversion Spend AveragePosition TimePeriod CampaignStatus AdGroupStatus DeviceType]},
                              {period: period})

Bulk Service

id = service.generate_report({report_type: 'DownloadCampaignsByAccountIds'
                              report_format: 'Tsv',
                              data_scope: 'EntityData'
                              download_entities: ['Keywords']},
                              {})

Get Report

Get report URL for download by report ID if it's ready

service.report_url(id) if service.report_ready?(id)

or get its content by ID (also once ready)

service.report_body(id) if service.report_ready?(id)

bing-ads-reporting's People

Contributors

babakgh avatar nic-lan avatar ricardoperez avatar robertino avatar

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.