Skip to content
Product Documentation

How to Set Up Google Reader Revenue Manager Enterprise with Arc XP Subscriptions

Arc XP Subscriptions offers an out-of-the box Google Reader Revenue Manager Enterprise integration (formerly known as Subscribe with Google), which allows publishers to provide seamless checkout and entitlement access to their customers.

Google Reader Revenue Manager Enterprise overview

Before learning more about the integration offering and about how to add Google checkout to your site, let’s learn a bit about Google Reader Revenue Manager Enterprise, from Google:

Google built Google Reader Revenue Manager to “enable news publishers to build sustainable reader-revenue business models.”

This offering seeks to assist with three key publisher goals:

  • Improving retention: Helping your users find value in their subscription
  • Driving engagement: Deepening engagement for readers and subscribers
  • Optimizing conversion: Removing friction for your users who show an intent to subscribe

Google lists a few key features that help you reach these goals:

  • Highlighting paid content across Google: Paying for a subscription is a clear indication that readers value and trust your publication as a source — so we want to make your content easy for subscribers to access. That’s why Google Reader Revenue Manager helps subscribers encounter their paid content across Google, including Search and News, to remind them the value of their subscription.
  • Persistent access to a subscription: Always having to log back in is a common pain point we hear from users. Google Reader Revenue Manager solves this challenge by helping subscribers stay logged-in across the web and apps, making it easier for subscribers to engage with their paid content and get the full benefit of their subscription.
  • Low-friction buy-flow: Google Reader Revenue Manager also includes an optional sign-in and payment flow that enables readers to use their Google account and payment methods, eliminating the need for account registration, memorizing new passwords, or entering a credit card. This purchase flow can be shown to some or all visitors, with a “ready to pay” signal for users with a form of payment already on file.
  • Linking a subscription to Google: These retention and engagement benefits are also available to existing subscribers who link their subscriptions to their Google Account. This means publishers can enable an entry point to convert existing subscribers to SwG subscribers without using the SwG buy-flow.

It is important to note that while Google manages the subscription, the publisher continues to have a direct relationship with the subscriber, including access to their email address.

Integration overview

You have two primary integration options. The most basic integration is Retention, which requires communicating subscription entitlements to Google so that the reader has access to their subscription and so that Google can highlight content from this relevant source with search results and Google News. Arc XP Subscriptions currently offers an integration for Subscribe with Google subscriptions purchased on the web and will add support for Play store purchases later in the year.

Retention

  • Enables readers to access their subscription across devices when signed into Google
  • Highlights search results for quick access to your articles
  • Google News will feature content from the reader’s subscriptions

Acquisition

  • Enables readers to purchase and manage subscriptions directly through Google

You can see an example acquisition experience by clicking on any of the ‘articles’ on this Google-Managed Demo Site:

Google-Managed Demo Site

Integration Steps: Overview

Learn about Google Reader Revenue Manager and the Arc integration

Arc’s technical account management and product management teams will provide you with a high-level overview of the integration and necessary next steps.

Sign up for Google Reader Revenue Manager

To move forward, the publisher must sign a Google Reader Revenue Manager Enterprise contract.

Review the Google Reader Revenue Manager documentation

Once the publisher has opted into the Google Reader Revenue Manager Enterprise program, they will be granted access to the Google Reader Revenue Manager Enterprise documentation hub.

Implement Sign In With Google

In order to integrate Google Reader Revenue Manager Enterprise, your site must offer Sign In With Google. Arc Subscriptions’s JavaScript SDK offers support for Sign In With Google. You can opt to implement this sign-in option before or during your Google Reader Revenue Manager Enterprise implementation. All of the benefits of Subscribe with Google are tied to the user’s Google account.

Set up product and price catalog within the Google admin

For each website you wish to offer Subscribe with Google, you must configure exactly one product and one or more price rates (offers).

Configure your Subscribe with Google account within Arc Subscriptions

Arc Subscriptions offers a self-service admin for configuring your Subscribe with Google payment provider to enable subscription updates to be synced between Google and Arc XP.

Publish an Android app

Offering Subscribe with Google requires an app in the Play store, but it is not necessary to offer this app for public consumption.

Update web SDK

In order to offer a seamless experience on your website, you’ll need to integrate with Arc XP’s newest micro web SDK to enable Subscribe with Google features like Subscription Linking & Subscribe With Google purchase flows.

Update article annotations

Content articles are annotated with structured data for Schema.Org subscription information, which allows Google to properly index and recommend relevant content to subscribers.

Update AMP

In order to sell subscriptions on AMP, you’ll need to tweak your AMP implementation.

Update your native app

In a future release (late 2021), Arc Subscriptions will offer Play store checkout for Subscribe with Google.

Validate your implementation

In order to go live, Google requires that you submit a video recording of each touchpoint — web, AMP, mobile — for review. Once approved, Google will enable your Subscribe with Google offering so that you can go live.

Integration Steps: deep dive

Add subscription to Android app via Play console

Google’s Play Console Help Section Includes Information About Adding A Subscription, though some references are outdated so Arc is including up to date screenshots below:

In the Play console, follow the navigation on the left to the Subscriptions section.

Monetize

Click on Create subscription

Create Subscription

Fill out the form.

Create Subscription

Add a base plan:

Set up the Subscription

Set up your base plan. You have the option to select Auto-renewing or Prepaid.

Base Plan ID

Set your subscription prices for the regions in which you’d like to make Subscribe with Google available to your readers.

Google Regions

Select your region(s) and set your prices.

Set Prices

Set Prices for a Region

Once you’ve added prices to your regions, you can activate your base plan.

Edit Base Plan

Once you have your products and prices set up in the Google Play Store, you can add your publication to Google’s Publisher Center.

  • Learn how to set up your account here.

  • After creating the publication, you must contact your Google rep to enable Google Reader Revenue Manager Enterprise for your organization. If you don’t have a Google rep, contact your Arc technical account manager to organize an introduction.

  • You will need to verify your site and add a logo to it first before doing anything else.

Google News Settings

  • Verify ownership

Publisher Center

  • Enter in your website url and press continue.

Welcome to Google Search Console

  • There are multiple ways you can validate your publication. The easiest way to validate is to use the meta tag but any way should work.

Verify Ownership HTML Tag

  • Once you have verified you can go back to the Reader Revenue Manager Enterprise on the Publisher center dashboard.
  • Now you can fill out your sites information
    • Google Cloud project ID: enter the same project ID you are using for Sign In With Google on your site
    • OAuth Client ID: choose the OAuth Client ID that you are using for Sign In With Google on your site
    • Entitlements verification URL: {apiOrigin}/sales/public/v1/swg/entitlements
      • Android Package: Select package in the drop down
      • Frequency limit: Add your limit
      • Privacy policy URL: from your website
      • Term of Service URL: from your website
      • Cookie policy: from your website
      • Minimum age of consent: Age requirement

Publication Setup

Publisher Policies

Enable Subscribe with Google in Publisher Center.

Publications Setup

Locate the developer account ID in Play console for linking your published app to Subscribe with Google.

Settings

Add product(s) to publication

Edit Product in Google

Enable Subscribe with Google Publication API in Google Developers Console.

Arc Identity

Subscribe with Google

After enabling Subscribe with Google Publication API you must provide your project ID to your Google contact.

Select a Projec

Enable the Reader Revenue Subscription Linking API, using the following link: https://console.cloud.google.com/apis/api/readerrevenuesubscriptionlinking.googleapis.com, or search for it in Google Cloud Console’s API Library.

API Library

Click Enable to turn on the Reader Revenue Subscription Linking API.

Product Details

Once you’ve turned on the Reader Revenue Subscription Linking APIs, you will then need to set up Subscription Linking in Google Publisher Center.

First, we need to get your GCP Project Number for the set up.

Navigate to the Google Cloud Console homepage by clicking on the “Google Cloud” logo in the top left, or by navigating to https://console.cloud.google.com/welcome?project={your-project-id}

Ensure you are using the same Google Cloud project ID as the one you set up earlier in Publisher Center, under Publication Settings.

You should see a screen like below and your Google Cloud Project Number:

Google Cloud Example

Copy your Project Number, and navigate to the “Subscription Linking” section for your publication in Google Publisher Center: https://publishercenter.google.com/subscription\linking?publication={your-publication-id}

You will see a screen like below.

Under the “Google Cloud Project Number” input, add your Project Number & save.

Subscription Linking

Once completed, verify your “Configured URLs” & “Publication ID” are correct.

Configuring Pub/Sub

  • Arc pulls the latest (Subscribe with Google) subscription status from Google every seven days and will terminate the (related) Arc subscription whenever we detect that the Google subscription has been terminated.
  • Arc will also use Google’s Reader Revenue Subscription Linking APIs to synchronize subscriptions that originate from Arc to Google.
  • For subscriptions that originate with Google (ex. purchased from AMP), Arc is able to receive pub/sub events from Google. Clients should configure their Google accounts to push to https://<api domain>/sales/public/v1/swg/pubsub. Arc will process SUBSCRIPTION_PURCHASED events only and will ignore all other events. When a new subscription is purchased (from Google) then Arc will register (if necessary) a new Google login and will link an Arc subscription to that login.

To enable this data synchronization, create a new “Subscribe with Google” payment provider:

Payment Provider Subscribe with Google

Integrating Google Reader Revenue Manager Enterprise in your site

Arc’s ArcSubscribeWithGoogle is an out-of-the-box SDK to integrate Google Reader Revenue Manager Enterprise with your frontend article/paywall, checkout and login pages. The SDK provides methods for handling various Subscribe with Google flows:

  • Linking subscriptions that have been purchased via Arc to a user’s Google account
  • Validating & handling entitlements from Google
  • Handling purchase responses from Google’s Subscribe with Google checkout flows to sync Subscribe with Google purchases with Arc

You will be responsible for:

  • annotating article pages with Subscribe with Google JSON-LD content annotations
  • loading & initializing Google’s swg.js on your site
  • adding the Subscribe with Google button to your Offers pages
  • initializing & using Arc ArcSubscribeWithGoogle SDK methods for login, purchase and subscription linking

Technical Implementation Guide: Javascript SDK

Prerequisites

Installation

Run the following command to install the Arc Subscribe With Google SDK in your project: npm i --save @arcxp/sdk-subscribe-with-google

Methods

  • ArcSubscribeWithGoogle.options(options)
    • used to initialize the ArcSubscribeWithGoogle SDK
    • Params:
      • options.apiOrigin — your API Origin
      • options.Identity — the Arc Identity SDK, after it’s been fully initialized
      • options.Sales — the Arc Sales SDK, fully initialized
      • options.debugMode — optional, logs debug info to the console when executing SDK methods
      • options.swg — the main subscriptions object from the swg.js client ready callback.
  • ArcSubscribeWithGoogle.getLinkStatus()
    • Get whether or not the currently logged in user has linked their subscriptions from Arc to their Google account.
    • Returns {linked: boolean}
  • ArcSubscribeWithGoogle.handlePaymentResponse(purchaseData)
    • Used to finalize the checkout process when a user purchases a subscription through Subscribe With Google flows. As part of the checkout process, this will either log the user in, or create a new account for the user using the Google account they used to purchase the subscription from Google.
    • purchaseData string. Represents the raw “purchaseData” json string that is returned from the paymentResponse in the SwG checkout flow.
  • ArcSubscribeWithGoogle.linkSubscription()
    • calls swg.js subscriptions.linkSubscription & if the user consents to subscription linking, instructs Arc backend systems to start sending Google information about the user’s subscriptions in Arc.
  • ArcSubscribeWithGoogle.lookupSubscriptionToken(subscriptionToken: string)
    • Used to determine if a subscriptionToken from Google belongs to a user that already exists in Arc
    • Returns {exists: boolean, profileId: string}
  • ArcSubscribeWithGoogle.loginUser(subscriptionToken: string)
    • Given a subscriptionToken, this will log the user in, using the Google user that purchased the subscriptionToken
  • ArcSubscribeWithGoogle.createAccount(subscriptionToken: string)
    • Given a subscriptionToken, this will create a new user, using the Google user that purchased the subscriptionToken

Page Setup

Google’s swg.js should be added to the following pages:

  • Article pages
  • Any page where the user can log in, if you’d like to check their Google entitlements & link entitlements on login
  • Purchase and checkout pages, if you’d like the user to be able to purchase subscriptions through Google on your site

Google recommends swg.js be included in auto-initialization mode on article pages, & manual initialization on your login, offer & checkout pages. Note: if you are also using Google Extended Access on your articles, you must include swg.js in manual initialization mode. Once your page is set up with swg.js, initialize the @arcxp/sdk-subscribe-with-google SDK:

import Identity from '@arc-publishing/sdk-identity';
import Sales from '@arc-publishing/sdk-sales';
import ArcSubscribeWithGoogle from '@arcxp/sdk-subscribe-with-google';
Identity.options({
apiOrigin: 'your-api-origin'
});
Sales.options({
Identity: Identity,
apiOrigin: 'your-api-origin'
});
(self.SWG = self.SWG || []).push((subscriptions) => {
ArcSubscribeWithGoogle.options({
Identity: Identity,
Sales: Sales,
apiOrigin: 'your-api-origin',
swg: subscriptions
});
});

Checking Entitlements

Once you’ve installed the @arcxp/sdk-subscribe-with-google SDK and included swg.js on your site, you can check for the user’s entitlements.

Action Summary

Checking Arc Entitlements & Linking Subscriptions If a user has a publisher subscription via Arc, and can ask the user if they’d like to link their subscription to Google so that the user can enjoy their subscription on Google surfaces. The following function checks if the user is logged in, has active subscriptions that originate in Arc & should link their subscription to Google.

export const linkSubscriptionIfEligible = async () => {
const isLoggedIn = await Identity.isLoggedIn();
if (!isLoggedIn) {
console.log('not logged in, no need to link');
return;
}
const linkStatus = await ArcSubscribeWithGoogle.getLinkedStatus();
const activeSubs = await Sales.getAllActiveSubscriptions();
if (!linkStatus?.linked && activeSubs.length) {
return await ArcSubscribeWithGoogle.linkSubscription();
}
};

This will send information about the user to Google’s Reader Revenue Management API & Arc will synchronize any publisher subscriptions originating from Arc with Google. You are free to choose when a user is prompted to link their subscription. Common cases include when the user logs in and when a user purchases a subscription via Arc.

Checking Subscribe With Google Entitlements If a user has an active & logged in Google session in their browser, Google’s swg.js will return any entitlements the user has through Subscribe with Google. If we receive any Google entitlements, we need to handle them appropriately, so entitled users can be registered or logged in & access their content. See: [https://github.com/subscriptions-project/swg-js/blob/main/docs/entitlements-flow.md](https://github.com/subscriptions-project/swg-js/blob/main/docs/entitlements-flow.md.

The following handleEntitlements function takes entitlements from swg.js and will either log the user in or initiate the deferred account creation flow to register the user in Arc Identity.

export const handleEntitlements = async (swgEntitlements) => {
const isLoggedIn = await Identity.isLoggedIn();
if (!isLoggedIn && swgEntitlements?.enablesThis()) {
const swgEntitlement = (entitlements?.entitlements ?? []).find(entitlement => entitlement.source === 'google');
if (swgEntitlement) {
const account = await ArcSubscribeWithGoogle.swg.waitForSubscriptionLookup(ArcSubscribeWithGoogle.lookupSubscriptionToken(swgEntitlement.subscriptionToken));
if (account.exists) {
// auto-login
const response = await ArcSubscribeWithGoogle.swg.showLoginNotification();
// show login consent prompt
// const response = await ArcSubscribeWithGoogle.swg.showLoginPrompt();
const login = await ArcSubscribeWithGoogle.loginUser(swgEntitlement.subscriptionToken);
setIsPaywalled(false);
} else {
// deferred account creation
const response = await ArcSubscribeWithGoogle.swg.completeDeferredAccountCreation({entitlements: entitlements, consent: true});
await ArcSubscribewithGoogle.createAccount(swgEntitlement.subscriptionToken);
setIsPaywalled(false);
await response.complete();
}
entitlements.ack();
return;
}
}
};
// you can then use the function as follows. Be sure the Identity, Sales & ArcSubscribeWithGoogle SDKs are initialized.
(self.SWG = self.SWG || []).push(subscriptions => {
subscriptions.setOnEntitlementsResponse(entitlementsPromise => {
entitlementsPromise.then(entitlements => {
handleEntitlements(entitlements);
});
});
});

Here is an example of how you might handle entitlements when a user is paywalled, but has entitlements in Subscribe With Google. If you’ve already set up the entitlements handler in the subscriptions.setOnEntitlementsResponse callback as shown above, you should not need to do this again in your paywall logic. However, you may do so, if you want the auto login/account creation flows to trigger only after the user depletes their meter and sees a paywall.

import { useEffect, useState } from 'react';
import Identity from '@arc-publishing/sdk-identity';
import Sales from '@arc-publishing/sdk-sales';
import ArcSubscribeWithGoogle from '@arcxp/sdk-subscribe-with-google';
const Article = () => {
const [ isPaywalled, setIsPaywalled ] = useState(false);
const [ isInitialized, setIsInitialized ] = useState(false);
useEffect(() => {
Identity.options({
apiOrigin: 'your-api-origin'
});
Sales.options({
Identity: Identity,
apiOrigin: 'your-api-origin'
});
(self.SWG = self.SWG || []).push(subscriptions => {
ArcSubscribeWithGoogle.options({
Identity: Identity,
Sales: Sales,
apiOrigin: 'your-api-origin',
swg: subscriptions
});
setIsInitialized(true);
});
}, []);
useEffect(() => {
const runPaywall = async () => {
window.ArcP.run({
paywallFunction: async (campaign) => {
setIsPaywalled(true);
const isLoggedIn = await Identity.isLoggedIn();
const swgEntitlements = await ArcSubscribeWithGoogle.swg.getEntitlements();
if (!isLoggedIn && swgEntitlements?.enablesThis()) {
const swgEntitlement = (entitlements?.entitlements ?? []).find(entitlement => entitlement.source === 'google');
if (swgEntitlement) {
await ArcSubscribeWithGoogle.swg.waitForSubscriptionLookup(ArcSubscribeWithGoogle.lookupSubscriptionToken(swgEntitlement.subscriptionToken))
.then(async (account) => {
if (account.exists) {
// auto-login
ArcSubscribewithGoogle.swg.showLoginNotification().then(async (response) => {
const login = await ArcSubscribeWithGoogle.loginUser(swgEntitlement.subscriptionToken);
setIsPaywalled(false);
});
} else {
// deferred account creation
const response = await ArcSubscribeWithGoogle.swg.completeDeferredAccountCreation({entitlements: entitlements, consent: true});
const account = await ArcSubscribewithGoogle.createAccount(swgEntitlement.subscriptionToken);
setIsPaywalled(false);
await response.complete();
}
});
}
entitlements.ack();
return;
}
}
});
};
if (isInitialized) {
runPaywall();
}
}, [isInitialized]);
if (isPaywalled) {
return <div>Paywall!!</div>;
}
return <div>{...your article page}</div>;
};
export default Article;

Purchasing SwG Subscriptions on Web We need to handle similar linking scenarios for when the user purchases a subscription via Subscribe With Google checkout on your site.

import { useEffect, useState, useRef } from 'react';
import Identity from '@arc-publishing/sdk-identity';
import Sales from '@arc-publishing/sdk-sales';
import ArcSubscribeWithGoogle from '@arcxp/sdk-subscribe-with-google';
const SwgOffer = () => {
const [ isInitialized, setIsInitialized ] = useState();
const swgOfferButton = useRef();
useEffect(() => {
Identity.options({
apiOrigin: 'your-api-origin'
});
Sales.options({
Identity: Identity,
apiOrigin: 'your-api-origin'
});
(self.SWG = self.SWG || []).push(subscriptions => {
ArcSubscribeWithGoogle.options({
Identity: Identity,
Sales: Sales,
apiOrigin: 'your-api-origin',
swg: subscriptions
});
setIsInitialized(true);
});
}, []);
useEffect(() => {
if (isInitialized) {
// open Subscribe with Google purchase modal
// ArcSubscribeWithGoogle.swg.subscribe('premium');
// open Subscribe with Google offer carousel
// ArcSubscribeWithGoogle.swg.showOffers({skus: ['basic', 'premium']})
// attach Subscribe with Google button
ArcSubscribeWithGoogle.swg.attachSmartButton(
swgOfferButton.current,
function() {
ArcSubscribeWithGoogle.swg.subscribe('premium');
}
);
// handle "Already subscribed?" user click event
ArcSubscribeWithGoogle.swg.setOnLoginRequest(() => {
// redirect the user to your login page
window.location.href = 'https://your-login-page.com';
});
// Set purchase event handler
ArcSubscribeWithGoogle.swg.setOnPaymentResponse((paymentResponse) => {
paymentResponse.then(async (response) => {
try {
await ArcSubscribeWithGoogle.handlePaymentResponse(response.purchaseData.raw);
await response.complete();
window.location.href = 'https://your-order-success-page.com';
} catch (e) {
console.error('Error syncing Arc purchase to Google', e);
}
});
});
}
}, [isInitialized]);
return <div ref={swgOfferButton} />
};
export default SwgOffer;

Subscribe with Google and AMP

a. AMP Paywall with Subscribe with Google

On your AMP article templates, include the following.

In your HTML header:

<script>https://cdn.ampproject.org/v0/amp-subscriptions-google-0.1.js"></script>

In the “amp-subscriptions” services config script tag, include the following:

<script>
{
"services": [
{
"type": "iframe",
"iframeSrc": "/amp/p.html",
// ... the rest of your Arc Subscriptions AMP Paywall config
}, {
"serviceId": "subscribe.google.com",
"baseScore": {your-base-score}
}
],
"fallbackEntitlement": "{your-fallback-entitlement}"
}
</script>

See Google’s documentation Here & Here for more information about service selection & the optional “baseScore” parameter.

b. Sell subscriptions on AMP

Follow Google’s Documentation Here to see how to sell Subscribe with Google subscriptions on AMP

c. Subscription Linking on AMP

To enable Subscription Linking with Subscribe with Google on AMP pages, ensure your login pages are configured according to These Instructions.

If you set up your pages to point to your existing login & registration pages, & you’ve followed the steps in this guide, they should already be set up to use the methods from the ArcSubscribeWithGoogle SDK.

Validate your implementation

At this point, your Subscribe with Google integration should be working smoothly and there’s just one final step before going: reviewing your implementation with Google. To gain final approval, you’ll need to submit screen recordings from all relevant workflows, including web and AMP.

Customer Support

Customers who purchased their subscription via Subscribe with Google are available in Arc Subscriptions’ customer service admin, though some features such as issuing a refund are unavailable for Google-managed subscriptions. Google does share the customer’s email address, making it easy to find and assist the customer.

Customer Support

If the customer is interested in managing their subscription — including canceling it — you can direct them to Myaccount.Google.Com.

If the customer service agent has sufficient privileged in their organization’s Google Play account, they can assist the customer in the Google Play Console, including issuing a refund or Canceling the subscription.