rochellecanale
rochellecanale

Reputation: 149

Event not listed in Google Analytics Realtime data

I have a form submit event on my page and added a gtag event after clicking the submit button. I tested it using the Google tag assistance and I can see that my event is firing since it is listed here - https://prnt.sc/zDDH6DRgVawa.

However, when I visit the real-time data on the Analytics, no events are listed here - https://prnt.sc/G6uswPi5tmo0. I tried refreshing and waiting for the GA events dashboard but no data is being fetched.

Here's the snipper where I put my script.

if(refUrl !== '' && currentUrl != refUrl) {

    let previousCampaign = break_address(refUrl);
    
    if(previousCampaign == 'campaign/monthly') {
        console.log('conversion monthly triggered!')
        
        gtag('event', 'conversion', {'send_to': 'AW-xxxxxxxx/xxxxxxxxx', 'value': 800.0, 'currency': 'PHP' });
    }
    if(previousCampaign == 'campaign/onetime') {
        console.log('conversion onetime triggered!')
        
        gtag('event', 'conversion', {'send_to': 'AW-xxxxxxxx/xxxxxxxxx', 'value': 800.0, 'currency': 'PHP' });
    }   

    console.log('CONVERSION FIRED!')
} else {
    console.log('CONVERSION NOT FIRED!')
    // INSERT CONVERSION FAILED API HERE...
}

I hope you can give me some help on this. :)

Upvotes: 0

Views: 106

Answers (1)

darrelltw
darrelltw

Reputation: 2372

From your code. We can see you use the gtag

But your send_to parameter is having a AW-xxx which is a Google Ads destination.

So there will be no data in your Google Analytics.

You can use gtag.config to register a GA Property or DataStream and copy your conversion event again to the GA Property

gtag('event', 'conversion', {'send_to': 'UA-XXXXXXX', 'value': 800.0, 'currency': 'PHP' });

Upvotes: 1

Related Questions