PostHog / integrations-repository

A repository for hosting a list of PostHog integrations, both official and community ones.
MIT License
1 stars 4 forks source link

Plugin request: Google Ads Conversions #10

Open mariusandra opened 3 years ago

mariusandra commented 3 years ago

I'd like to track how well my ads are converting, without using Google Tag Manager or any other third party script tags. To do that I see two ways:

Option 1: utm_campaign=Ad Text Here

  1. Add ?utm_source=adwords&utm_campaign=my_ad_2021_b_final_new_v2 similar tracked parameters to the end of each URL that an ad leads to.
  2. Use PostHog to analyse the conversion data, breakdown by campaign, etc.

Drawback: This will work, but without telling Google if an ad converted or not, we won't benefit from their ad optimisation and intelligence tools. There would be some manual back and forth between posthog and google ads. Would this be fine?

Option 2: Offline Conversion Actions

The aim is to send a backend API request to Google whenever a conversion action/event is triggered within PostHog. To do this we must:

It's still a bit of work, some of these steps will need to be performed by anyone using the plugin, and Google can always refuse access if they so decide.

Option 3: Offline Conversion Actions / Manual upload

Manual import of Conversion Actions or integration through any of the other supported import paths (salesforce, zapier, hubspot).

Option 4: Search Ads 360

If the user has a subscription to this talk to sales service, there's an alternative API to track conversions

marcushyett-ph commented 3 years ago

Thanks for this detailed issue @mariusandra

My concern with option 1 is that the benefits of conversion optimization can be really significant, conversion monitoring alone will likely lead to a lot higher cost per acquisition.

With Option 3, I wonder if we can do this easily today with our HubSpot plugin?

charlescook-ph commented 3 years ago

With Option 3, I wonder if we can do this easily today with our HubSpot plugin?

I'll have a look at our Zapier app as well.

charlescook-ph commented 3 years ago

I'll have a look at our Zapier app as well.

Hm, Zapier seemed kinda promising (easy to select a PostHog Action to be the trigger) but I got stuck on the second half:

Screenshot 2021-08-26 at 14 32 25
mariusandra commented 3 years ago

Yes, this gclid is something we will need to capture via posthog-js on the website. Google Ads append this to any URL they open, so we just need to capture it from the URL. Alternatively, posthog-js could do it automatically. I'm not sure what is needed to make that data flow into Zapier. @Twixes perhaps does?

The conversion action should be something you set up in Google Ads, e.g. "the coupon I printed with this qr code was used at my restaurant".

samwinslow commented 3 years ago

There's a "Formatter" step we can add which can apply regex. If gclid is appended to the URL, it should be simple enough to extract it from $current_url.

Is that property included with actions, or only events? If I'm understanding this correctly it looks like our Zapier integration only supports actions as triggers, not events.

marcushyett-ph commented 3 years ago

I guess we’d need to set and get the gclid in a cookie though since we’re not likely to trigger the conversion event on the landing page which will have the gclid in the url.

On Thu, 26 Aug 2021 at 15:27, Sam Winslow @.***> wrote:

There's a "Formatter" step we can add which can apply regex. If gclid is appended to the URL, it should be simple enough to extract it from $current_url.

Is that property included with actions, or only events? If I'm understanding this correctly it looks like our Zapier integration only supports actions as triggers, not events.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <PostHog/integrations-repository#10>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUKYC7KTU54PTSMSJY2PTQLT6ZFMXANCNFSM5C3IZA5A .

charlescook-ph commented 3 years ago

it looks like our Zapier integration only supports actions as triggers, not events.

Yep that's right

mariusandra commented 3 years ago

There's a "Formatter" step we can add which can apply regex. If gclid is appended to the URL, it should be simple enough to extract it from $current_url.

The infrastructure already exists for this:

mariusandra commented 3 years ago

Slight updates:

yakkomajuri commented 2 years ago

What's the status on this?

JPustkuchen commented 11 months ago

eTracker provides a mechanism of Conversion Upload / export that is quite smart: https://www.etracker.com/en/docs/integration-setup-2/campaign-tracking/google-ads/conversion-upload-guide/

Perhaps something like that would be the better alternative out of the box. So you wouldn't have to use Zapier or other Third-Party services, just the plugin? And I think Google Ads is still very popular ;)

gregegan commented 5 months ago

Any updates here on this plugin?

TriPSs commented 4 months ago

@gregegan until there is a plugin you could just create a rest endpoint somewhere that returns an CSV that follows the Google Ads format, you can then point to that endpoint in Goals -> Conversions -> Uploads -> Schedules.

JPustkuchen commented 1 month ago

I now emailed the wonderful Posthog support to let them know about this missing essential feature and hopefully they'll pick it up! Would be so helpful to have this feature, Posthog has everything else, but this!

MarconLP commented 1 month ago

Hey @JPustkuchen, we just released a Google ads conversions integration that you can set up in the data pipelines menu: https://us.posthog.com/pipeline/new/destination/hog-template-google-ads

JPustkuchen commented 1 month ago

@MarconLP Yaaaaaaaay, you're my hero of the day!! Thanks! So @mariusandra what's the plan here to proceed?

Still I think it might be something that Posthog should maybe ship in "core"? At least kind of an export or unifiend API?

Edit: Sorry I thought this was third-party! Whao, super nice <3

mariusandra commented 1 month ago

Sweet. Well, let us know if this does what you'd expect, and if we can finally close this issue 😅

kitsirota commented 1 month ago

Thank you so much for adding this destination!

I would love to start moving over to this right away, but I am unable to add the AdWords connection. It looks like the GCP OAuth redirect URL is misconfigured.

When adding the AdWords connection, Google OAuth flow throws the following error:

Error 400: redirect_uri_mismatch

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.

If you're the app developer, register the redirect URI in the Google Cloud Console.
Request details: redirect_uri=https://us.posthog.com/integrations/google-ads/callback flowName=GeneralOAuthFlow
JPustkuchen commented 1 month ago

@mariusandra I can indeed confirm the error reported by @kitsirota - I guess you're already on it! Let us know here, once it's fixed.

MarconLP commented 1 month ago

Hey guys, sorry for the inconvenience. We have submitted the Google integration for verification and expect it to take a few days before the integration is approved.

kitsirota commented 1 month ago

@MarconLP Just in case you run into issues getting verified, if you submit the application for approval without specifying branding/logo as part of the verification request, it will automatically approve you.

We ran into this issue about two years ago when we submitted an app for approval (with our logo), that application is still pending. Our Google account rep suggested the workaround to submit a new oauth application request without branding/logo and it was automatically approved same day.