Integrate with Google Analytics

You can integrate Google Analytics 4 (GA4) conversion tracking with Memberful. When someone completes a checkout through Memberful, we send an ecommerce event to Google Analytics.

In this help doc:

Add the Memberful domain in your GA4 settings

Follow Google’s documentation to set up cross-domain measurement. Under Domain add memberful.com.

Create a data stream to receive a Measurement ID

From your GA account, click Admin (gear at the bottom-left), select the Property, and then Data Streams. From there you can either create a new stream or select an existing one to receive a Measurement ID.

Your Measurement ID will look like this: G-XXXXXXXXXX. Keep it handy as you'll use it in the following steps.

Configure your site using one of the following methods

WordPress plugin

  1. Install and activate the GA Google Analytics plugin on your WordPress site.
  2. Visit Settings → Google Analytics → Plugin Settings.
  3. Enter your GA Tracking ID.
  4. Choose Google Tag.
  5. Click Save changes. After 24-48 hours, you can log into your Google Analytics account to view your stats.

The last step is to activate Memberful's Google Analytics integration.

Google Tag Manager

For non-WordPress sites, you’ll need to enable Google Analytics to track users when they click a Memberful link on your site.

If you include Google Analytics on your site using Google Tag Manager, enable cross-domain measurement for Google Analytics 4. In step 5, enter memberful.com under Domain.

The last step is to activate Memberful's Google Analytics integration.

gtag.js

For non-WordPress sites, you’ll need to enable Google Analytics to track users when they click a Memberful link on your site.

Replace TAG_ID with your Measurement ID from earlier.

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'TAG_ID');
</script>

For more details, refer to the gtag.js documentation.

The last step is to activate Memberful's Google Analytics integration.

Test Google Analytics

After you’ve enabled cross-domain measurement using one of the above methods, right-click the Memberful link on your site and select Open Link in New Tab. You should see a linker parameter in the address bar that looks like this:

_gl=2*2skltp7...

Configure Memberful’s Google Analytics integration

Navigate to Settings → Third-Party Services from your Memberful dashboard, and activate the Google Analytics integration. You'll need to input the Measurement ID you found earlier.

Keep in mind that certain privacy-focused browsers (like Safari and Firefox) block Google Analytics events, and some members may use ad-blocker plugins.

If you'd like to reduce the likelihood of conversions being blocked, you can optionally use server-side tagging to send data directly from your server to Google Analytics.

You're done! Once you connect to Stripe, and leave test mode, Memberful will track all new purchases in Google Analytics.

Track Google Ads

Once set up, you can measure which orders (and the value of those orders) are attributable to your Google Ads. Google Ads is another sales channel that will show up in Google Analytics. After setting up your Google Ad campaign, the Google Ads data is typically pulled right into Google Analytics.

If you want to attribute order amount to those Google Ads, you'll need to make sure the Google Analytics-Memberful integration is configured and that you create events to assign attribution.

Track logged-in members

Memberful does not track logged-in members as we don't store any login-related data in our database.

You can track logged-in members by using a WordPress site with the wp_login action. You will require the following:

(Optional) Implement server-side tagging

If you'd like to reduce the likelihood of conversions being blocked by privacy-focused browsers or ad-blocker plugins, you can use server-side tagging. This method sends data directly from your server to Google Analytics, bypassing the user's browser.

Memberful does not host the tagging servers, so you'll need to set up your own tagging server container.

As you set up the client configuration in Google Tag Manager, you'll need to enable "Default gtag.js paths for specific IDs".

Default gtag paths for specific IDs

Once you've configured your tagging server, navigate to Settings → Third-Party Services → Google Analytics → Settings from your Memberful dashboard and enter your server's URL in the Server URL field.

Server-side tagging

This will allow Memberful to send data to your server, which will then forward it to Google Analytics, bypassing the user's browser and reducing the likelihood of conversions being blocked.

Related help docs:

Can't find what you're looking for? We'd love to help! 💪

Send us a message through the orange chat bubble in the lower right corner of the page. You'll hear back within a few hours Monday - Friday. 😀