hidden heading

  • Threads
  • Categories
  • Users
  • Blog
  • forum
  • group
  • search
  • chevron_right Threads
  • label Identifying Conversions

Purchase events sent via Measurement Protocol source is always "direct"

mmadhu
Sept. 21, 2023
chat_bubble_outline 2
  • link
    mmadhu
    Members 24 posts
    Sept. 21, 2023, 11:13 a.m. Sept. 21, 2023, 11:13 a.m.
    link

    I am sending purchase events on the server-side via the Measurement Protocol like so:

            'client_id' => $_COOKIE['_ga'],
            'events' => array(
                'name' => 'purchase',
                'params' => array(
                    'currency' => $currency,
                    'transaction_id' => $referenceCode,
                    'value' => $value
                )
            )
    

    Everything seems to function properly, except for the fact that all of them display "direct" as their source. Given the significant influx of traffic from Google Ads, it's reasonable to assume that at least one of the conversions originated from an advertisement. Should the system automatically establish a connection between user tracking using the client_id variable, or do I need to take additional action, like manually configuring the campaign_details? If manual setup is required, it does seem peculiar that GA4 wouldn't handle this automatically by utilizing the client_id.

  • link
    agkhy
    Mod 110 posts
    Oct. 3, 2023, 8:36 a.m. Oct. 3, 2023, 8:36 a.m.
    link

    client_id per Analytics mania: www.analyticsmania.com/post/google-analytics-client-id/#find

    Purchase Events Question.png

    Purchase Events Question.png

    PNG, 112.0 KB, uploaded by agkhy on Oct. 3, 2023.

  • link
    mmadhu
    Members 24 posts
    Oct. 3, 2023, 8:36 a.m. Oct. 3, 2023, 8:36 a.m.
    link

    Thank you for this. The solution is indeed to remove GA1.1.​ from the beginning of the ID and send that as the client_id ​value.

There are no more posts in this thread.

easyinisghts_logo
likedininstagrammediumtwitter

Singapore
14-04 160 Robinson Rd,
Singapore - 068914

India
619/2-7, Chattarpur,
Delhi, 110074

Join our Newsletter

Become a data driven marketer

Resources

  • Knowledge Base
  • Blogs
  • Ebooks
  • Contact Us
  • Use Cases

Join our Newsletter

Become a data driven marketer

Singapore
14-04 160 Robinson Rd,
Singapore - 068914

India
619/2-7, Chattarpur,
Delhi, 110074

© 2024 EasyInsights. All rights reserved. | ® EasyInsights Pvt. Ltd.