Integrate Sign in with Google for Reader Revenue Manager

Your readers can sign in to third-party websites and apps quickly and securely with Google Identity Services (GIS), also known as Sign in with Google. They can enjoy a fast, low-friction sign-in and registration experience through Google One Tap which is the key feature of GIS. This integration with Reader Revenue Manager (RRM) provides 3 key benefits:

  • Multi-prompt coordination: RRM prompts, like paywalls and One Tap pop-ups, coordinate to prevent conflict so readers get only one sign-in request at a time.
  • Unified sign-in: Google One Tap powers the RRM registration wall and replaces the multi-step sign-in process with a single-click experience. This reduces friction and prevents high onboarding drop-off rates.
  • Automatic entitlements: RRM automatically recognizes readers who sign in through Google One Tap. This provides them instant access to their subscriptions and metered content. Publishers can use GIS to sign-in without RRM prompts.

Set up Sign in with Google

If you’re new to Sign in with Google and Google One Tap, use these resources to learn the implementation basics:

Here are the overall steps to get started with Google One Tap.

  1. To configure your OAuth Consent Screen, follow the steps described in Setup.
    • Obtain a client ID and load the client library.
  2. To place a code snippet on pages where you want to use Google One Tap, select HTML or

JavaScript.

  1. To configure a callback to handle a credential response, use either HTML or JavaScript.

Set up registration wall in Publisher Center

The Publisher Center's new guided experience simplifies your Sign in with Google integration. This streamlines how to get credentials and install scripts.

  1. To Setup, click Reader Revenue Manager and then Content Access.
  2. Click Reader funnels and then Reader registration.
    • Tip: For Enterprise publishers, the “Reader funnels” menu is labeled “Overview.”
  3. Turn on Sign in with Google.

  1. Follow the steps in ”Set up Sign in with Google.”
  2. Paste a website URL that has Google One Tap on.
  3. Click Verify.

  1. Confirm that the message has changed to “Reader registration is set up to use Sign in with Google for account creation.”

Integrate client-side code

To integrate the Google One Tap API with the RRM Reader Registration feature:

  1. Initialize swg.js:
  2. Add the rrm_interop and callback parameters to your GIS snippet:
    • To enable prompt deconfliction, add the data-rrm_interop ='true' parameter to your Google One Tap HTML snippet or include rrmInterop: true for the JavaScript API.
    • Configure GIS to use a callback function (e.g., handleCredentialResponse) to receive the credential token. Detailed implementation instructions for handleCredentialResponse are provided in the following step.

HTML API example:

JavaScript

<div id="g_id_onload"

data-client_id="YOUR_GOOGLE_CLIENT_ID"

data-login_uri="https://your.domain/your_login_endpoint"

data-your_own_param_1_to_login="any_value"

data-your_own_param_2_to_login="any_value"

data-callback="handleCredentialResponse"

data-rrm_interop='true'>

</div>

JavaScript API example:

JavaScript

google.accounts.id.initialize({

client_id: 'YOUR_GOOGLE_CLIENT_ID',

callback: handleCredentialResponse,

rrm_interop: true,

});

  1. Processing the credential in the callback
    • To complete the integration, process the GIS credential using processGisCredential. Depending on your setup, you will add this to either the SWG_BASIC queue (for Reader Revenue Manager Standard) or the SWG queue (for Reader Revenue Manager Enterprise).

For Reader Revenue Manager Standard (RRM:S) using SWG_BASIC:

JavaScript

function handleCredentialResponse(response) {

if (response.credential) {

(self.SWG_BASIC = self.SWG_BASIC || []).push((basicSubscriptions) => {

basicSubscriptions

.processGisCredential(response, {

gisClientId: 'YOUR_GIS_CLIENT_ID',

});

});

}

}

For Reader Revenue Manager Enterprise (RRM:E) using SWG:

JavaScript

function handleCredentialResponse(response) {

if (response.credential) {

(self.SWG = self.SWG || []).push((subscriptions) => {

subscriptions

.processGisCredential(response, {

gisClientId: 'YOUR_GIS_CLIENT_ID',

});

});

}

}

This ensures that the credential returned by GIS is properly passed to and processed by Reader Revenue Manager, completing the synchronization of sign-in state and entitlements for both versions.

Related resources

Search
Clear search
Close search
Google apps
Main menu
17857761140039006384
true
Search Help Center
false
true
true
true
true
true
100499
false
false
false
false
false