Posts tagged with google-analytics-4

I want to implement both Google Remarketing and GA4 Ecommerce events into my website.

According to the latest Google Ads Remarketing docs (https://support.google.com/tagmanager/answer/6106009?hl=en#zippy=), this is done like this:

dataLayer.push({   'event': 'add_to_cart',   'value': 78.45,   'items' : [{     'id': '1234',     'google_business_vertical': 'retail'   }] }); 

I already have lots of dataLayer pushes using the same event names (e.g. add_to_cart etc.) also using the "items"-array for GA4 Ecommerce events - but for those, the identifier is not id, but item_id. See the official reference here: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?hl=de&client_type=gtag#add_to_cart

Now I am wondering: whats the best and correct way, to implement both frameworks? Do I:

  1. do 2 pushes, once the ga4 ecommerce one and once the remarketing one?
  2. combine both pushes and use both id AND item_id as keys in my array?
  3. push 2 item-arrays within one push, as our marketing agency suggested?

None of those options seems really ideal to me.

I have implemented the GA4F SDK in our Android app to fetch Google ads app campaign Deferred Deeplink , and Google Ads support has confirmed that our setup, including the deep links, looks good. However, the functionality still isn’t working.

Issue - deeplink is not recieving in GA4F sdk or Install referrer callbacks.

Deeplinks pass validations in Google Playstore and Google ads deeplink validator

Still having issue

Sdk implementation Reference link -> https://support.google.com/google-ads/answer/12373942?hl=en#zippy=%2Csteps-to-activate-ddl-in-the-gaf-sdk

Is there any configurations missing between Google ads and GA4F ?

based on unique keys (ga_session_id || user_pseudo_id) we want to find the first event that started that session. but some records have the same event_timestamp. is there a document that shows which event is earlier?

I couldn't find anything about it in the documents.

Problem: I have an appointment booking widget (non-iframe) embeded into a webpage. How do I ensure GA4 is picking up on these form submissions?

Additionally, how does the form submission correlate up to the success of the Google Ad?

I have embeded this javascript in the form to ensure it fires data to GA4, but marketers are still telling me the conversions are not appearing with a traffic source from the UTM.


async function triggerConversionEvent() {

        const measurementId = 'measurementId'; // Replace with your GA4 Measurement ID         const conversionEventName = 'self_booked_appointment'; // Replace with your conversion event name         const clientId = 'booking_engine'; // Replace with a unique client ID (can be randomly generated)         const url = `https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}`;         const body = {             client_id: clientId,             events: [                 {                     name: 'conversion',                     params: {                         event_name: conversionEventName,                     }                 }             ]         };         try {             const response = await fetch(url, {                 method: 'POST',                 headers: {                     'Content-Type': 'application/json'                 },                 body: JSON.stringify(body)             });             if (response.ok) {                 console.log('Conversion event triggered successfully');             } else {                 console.error('Failed to trigger conversion event');             }         } catch (error) {             console.error('Error triggering conversion event:', error);         }     }