Skip to content

Allow changing of 'ga' global variable#832

Merged
matthewlane merged 1 commit intoprebid:masterfrom
dantarion:patch-1
Dec 16, 2016
Merged

Allow changing of 'ga' global variable#832
matthewlane merged 1 commit intoprebid:masterfrom
dantarion:patch-1

Conversation

@dantarion
Copy link
Contributor

Type of change

  • Bugfix

Description of change

The documentation uses this snippet of code to instruct people how to set up the Google Analytics adapter

    pbjs.enableAnalytics({
        provider: 'ga',
        options: {
            global: 'ga', // <string> name of GA global. Default is 'ga'
            enableDistribution: false,
        }
    });

However, nothing actually references options.global. src/adapters/analytics/ga.js sets _gaGlobal to ga always.

Am I missing something here? Is this a bug, or is the documentation wrong?

The documentation uses this snippet of code to instruct people how to set up the adapter.
```
    pbjs.enableAnalytics({
        provider: 'ga',
        options: {
            global: 'ga', // <string> name of GA global. Default is 'ga'
            enableDistribution: false,
        }
    });
```

However, nothing actually references `options.global`. `src/adapters/analytics/ga.js` sets `_gaGlobal` to `ga` always.

Am I missing something here? Is this a bug, or is the documentation wrong?
@matthewlane
Copy link
Collaborator

Good catch, thanks @dantarion

@matthewlane matthewlane merged commit 7650968 into prebid:master Dec 16, 2016
mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…ebid-official-0.17.0 to release/1.12.0

* commit 'bce975978c2c088d301d120b949d38080ca9d314':
  Add changelog entry.
  Prebid Release 0.17.0
  remove hb_pb targeting key for deal bids with no cpm (prebid#881)
  Fix for bug prebid#866 (prebid#867)
  Allow changing of 'ga' global variable (prebid#832)
  emit auction end event before bidsBackHandler callback (prebid#884)
  Add Widespace adapter (prebid#846)
  prevent rubicon adapter from registering two bids on exceptions (prebid#854)
  Code Refactoring - Upgrading end point. (prebid#826)
  Ignore test html pages (prebid#878)
  Detect browser width instead of the screen width (prebid#837)
  New aardvark adapter with support for aliasing (prebid#875)
  Add Fidelity adapter (prebid#862)
  Adkernel adapter aliasing (prebid#857)
  0.16.1-pre
mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…12.0 to master

* commit '728f1763ce2a282a757546e934199313a4771a21':
  Fix failing unit test on CI.
  Add changelog entry.
  Prebid Release 0.17.0
  remove hb_pb targeting key for deal bids with no cpm (prebid#881)
  Fix for bug prebid#866 (prebid#867)
  Allow changing of 'ga' global variable (prebid#832)
  emit auction end event before bidsBackHandler callback (prebid#884)
  Add Widespace adapter (prebid#846)
  prevent rubicon adapter from registering two bids on exceptions (prebid#854)
  Code Refactoring - Upgrading end point. (prebid#826)
  Ignore test html pages (prebid#878)
  Detect browser width instead of the screen width (prebid#837)
  New aardvark adapter with support for aliasing (prebid#875)
  Add Fidelity adapter (prebid#862)
  Adkernel adapter aliasing (prebid#857)
  0.16.1-pre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments