Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Prebid analytics with ga - missing event

Open soman opened this issue 5 years ago • 5 comments

Type of issue

question

Description

Enable prebid analytics with ga. Built prebid.js with google analytics adapter. I'm not seeing any ga event information from google analytics report. Also not seeing from browser console with ?pbjs_debug=true

GA log below:

prebid ga log

Gtag code:

gtag

Expected results

I want to see the ga events log from both browser console and google analytics report. https://github.com/prebid/prebid.github.io/blob/master/dev-docs/analytics-ga.md

soman avatar Jan 14 '21 06:01 soman

@muuki88 you're the only one to have touched the google analytics adapter in years...do you have any insights you could provide here?

smenzer avatar Jan 14 '21 08:01 smenzer

hi @soman

I used the GA adapter quite a while ago, but dropped it due to bad data quality (we don't have Google Analytics 360 and sampling was really bad). Back than we integrated google analytics directly and not via gtag, not sure if that makes a difference.

Are there any analytics events being sent? I mean can you see them on the network tab? The logs you posted seem to say that there are indeed events being sent to google analytics.

The docs you reference show some diagrams when you actually analyse the data inside google analytics.

muuki88 avatar Jan 14 '21 10:01 muuki88

@soman, I wrote a bit of adapter code 2 years ago:

function gtagTOga(a, b, category, action, label, value, fieldsObject) { gtag('event', action, { event_category: category, event_label: label, value: value, non_interaction: true }); }
pbjs.que.push(function () {
     pbjs.enableAnalytics([{ provider: 'ga', options: { enableDistribution: true, global: 'gtagTOga' } }]);
});

DavidBowdoin avatar Jan 21 '21 04:01 DavidBowdoin

@soman have you had any luck with this issue / is it outstanding?

gglas avatar Mar 29 '21 15:03 gglas

@soman closing this issue pending your response

gglas avatar May 10 '21 15:05 gglas