Learn business growth with Google Analytics 4 Forums Google Analytics 4 Linking Salesforce Leads to GA4 Conversions: Overcoming Session ID Challenges

  • Linking Salesforce Leads to GA4 Conversions: Overcoming Session ID Challenges

    Posted by Archie on 11 January 2023 at 8:40 pm

    Hey there! So, here’s my situation. I’m trying to crack a nut involving a conversion event from Salesforce to GA4 via the measurement protocol. The sticking point is figuring out how to create a payload that can pinpoint the specific session that led to a converted lead.

    At the moment, I’ve got GTM snagging the CID and sending it along when a lead heads to Salesforce. Once that lead converts, the CID comes back our way with the “offline conversion” event to GA4.

    But hold on a minute, my client wants a bit more. They want to connect the dots between the session that generated the lead and the eventual conversion. So picture this, I hit a site three times using the same CID and on my second visit drop a lead like it’s hot. Well, this client wants to track that hot lead right back to the second session.

    The snag is GA4 doesn’t have a neat and tidy session ID tag like the CID for me to use right away. I figured I could work around this by pairing a timestamp with the CID from Salesforce. But the rub is that timestamps only let us go back in time a max of three calendar days based on timezone. That spells trouble if our lead takes a fortnight or more to convert.

    So here’s the lowdown: I need a solution that lets me draw a line from the session that cooked up the lead all the way to the conversion finish line. All of this in spite of GA4’s lack of a clear session ID value. If anyone’s got some light to shed here, I’m all ears. Thanks a ton!

    Noah replied 11 months, 2 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Henry

    7 April 2023 at 7:51 pm

    Hey there! Don’t worry, there are ways to pinpoint the specific session that led to a converted lead. You just need to include the session_id in your request to the Measurement Protocol.

    Go ahead and look up the session ID using a couple of tried-and-tested methods. Either use this resource at https://developers.google.com/tag-platform/gtagjs/reference#get or just pull the session ID straight from the GA4 Cookie.

    I understand your need to attribute the lead back to the exact session and hope this helps you get that sorted out!

  • Noah

    5 June 2023 at 12:16 pm

    Sure, I understand that you’re struggling to track specific user sessions that lead to conversions from Salesforce to GA4 due to the lack of a unique session ID in GA4. It sounds like you’ve already tried using a combination of the CID and timestamps. But since timestamps only let you go back a maximum of three days, it’s not giving you the long-term tracking you need.

    One way around this could be generating your own unique session ID for each visit, and then sending it, alongside the CID, to Salesforce when a lead is generated. This unique ID could then be passed back with the “offline conversion” event to GA4 when the lead converts. This method would let you directly tie an offline conversion to a specific site session, without being bound by the 3-day limit of timestamps.

Log in to reply.