Google Analytics

Integration guide for sending Recurly Engage prompt interaction events to Google Analytics via client-side SDK and server-side Measurement Protocol.

Send Recurly Engage prompt events to Google Analytics (GA) to see prompt engagement alongside your existing site metrics. You can use a client integration, a server integration, or both.
Available on all Recurly Engage subscription plans

Prerequisites

  • You must have Company or App Administrator permissions in Recurly Engage.
  • You must have a Google Analytics property and tracking ID (GA Tag ID).
  • You must have access to Recurly Engage → Settings → Integrations → External → Google Analytics.
  • For server-side calls, you should be familiar with the Measurement Protocol (v1).

Definition

The Google Analytics integration provides two methods for sending prompt events to GA: a client integration and a server integration.
  1. Client integration: Uses your existing GA JavaScript software development kit (SDK) instance to fire custom events for prompt interactions.
  2. Server integration: Sends events through an API action using the Google Analytics Measurement Protocol.

Key benefits

Unified reporting View prompt metrics in your GA dashboards alongside pageviews and user behavior.
Session continuity Events fire in the same session context as your GA page events.
Custom payloads Use GA's Measurement Protocol to include any relevant parameters.

Key details

Client integration

For web-based devices, Recurly Engage uses the running instance of the Google Analytics JavaScript SDK. This preserves session and user context when it reports real-time prompt events.

1

Open the Google Analytics settings

In Recurly Engage, go to Settings → Integrations → External → Google Analytics.

2

Enter your GA Tag ID

Enter your GA Tag ID.

Event details

ActivityDescription
Recurly Engage Prompt ImpressionA user has seen the prompt
Recurly Engage Prompt DismissA user has dismissed the prompt by clicking the close button or outside the prompt view
Recurly Engage Prompt TimeoutThe prompt closed automatically due to a timer
Recurly Engage Prompt DeclineA user has declined the prompt by clicking the decline button
Recurly Engage Prompt ClickA user has accepted the prompt by clicking the primary call-to-action (CTA) button
Recurly Engage Prompt HoldoutA holdout user has reached the prompt but not seen it
Recurly Engage Prompt Click 2A user has accepted the prompt by clicking the secondary CTA button

Each event includes these attributes when applicable:

Event propertyDescription
promo_idUnique prompt identifier (see Prompt Details)
promo_nameName of the prompt
variation_idIdentifier of the experiment variation (if any)
variation_nameName of the experiment variation (if any)
event_timestampTimestamp when the interaction occurred

Server integration

1

Create an API action

In Settings → Actions → API Actions, configure a POST action to send events through the Google Analytics Measurement Protocol (v1). Use the following endpoint.

https://www.google-analytics.com/collect
2

Specify the payload

Include the required and optional Measurement Protocol parameters listed below.

  • Required: v (protocol version), tid (Tracking ID), and t (hit type, for example, event).
  • Optional: cid (Client ID), ec (event category), ea (event action), el (event label), and ev (event value).

See the full Measurement Protocol parameter reference.

3

Add the action to a prompt

Attach the new API action to a prompt interaction (Accept, Decline, and so on) or within a guide or experience. For detailed steps, follow the Add Action guide.


Did this page help you?