Skip to Content
Product Information
Author's profile photo Xuebo Liang

Google Analytics Integration with SAP Marketing Cloud

Update: With 1902 release of SAP Marketing Cloud, the integration with Google Analytics is enhanced; and an integration with Google BigQuery for datasets imported with Google Marketing Platform Analytics 360 is newly provided. With 1908 release of SAP Marketing Cloud, by setting up the SAP Outbound ID as a custom dimension in Google Analytics, it can be used to track email campaign receivers’ website visit behavior. Please refer to this well written article from my colleagues for more detail.

Context

Google Analytics is a free web analytics service offered by Google that tracks and reports website traffic. It is the most widely used web analytics service on the Internet, based on BuiltWith research, Google Analytics is used by 65% of the 10,000 most popular websites ordered by popularity; 74% of the top 100,000 popular websites.

Scenario

With the Google Analytics integration customers of SAP Marketing Cloud 1705 release can attribute web business documents like web shop sales orders or travel bookings to campaigns. With that the campaign success data can also include last touch conversions captured via Google Analytics.

How to Use It

The integration with Google Analytics loads conversion data from Google Analytics into SAP Marketing Cloud that add the campaign information to previously loaded business document interactions like web shop sales orders or travel bookings.

These are the steps that need to be followed:

  1. Business documents (e.g. sales orders) need to be loaded into SAP Marketing Cloud. The documents must have a unique ID (e.g. order ID) which is also captured by Google Analytics. See more details on this in the prerequisites section.
  2. Google Analytics must be set up and the event that is relevant for the campaign conversion must be captured. E.g. the successful checkout page must capture the sales order. See more details on this in the prerequisites section.
  3. The technical integration needs to be set up. See more details on this in the prerequisites section.
  4. Campaign parameters must be passed to Google Analytics. This is done by adding parameters to the urls that are contained in all marketing messages / links / pictures etc. See this blog for more details on adding these parameters to email messages: https://blogs.sap.com/2017/03/29/multiple-url-parameters-in-email-templates-in-sap-hybris-marketing-cloud/ Note: the url parameter utm_campaign must be the campaign ID of SAP Marketing Cloud as this is used to attach further campaign related information. Only the campaign ID is unique on SAP Marketing side while the same campaign name might be used for many different campaigns.
  5. Load Google Analytics data into Marketing to enrich business documents:

a. Log on as Marketing Administrator and open the app.

b. To create and schedule a job based on delivered job template ‘Interactions: Enrich Sales Orders with Google Analytic’.

The following parameters are used to retrieve data from Google Analytics. It is recommend that you use the Google Analytics Query Explorer to verify these parameters before you scheduling the job in SAP Marketing Cloud.

  • View ID: Enter the ID of the view from Google Analytics that you are retrieving data from.
  • Start Date and End Date: Enter the date range for which you want to retrieve data from. It is recommended that you run the job on daily basis; you also need to make sure sales orders are imported into SAP Marketing Cloud before the enrichment.
  • Metrics: Regardless of the metric, its value isn’t used in the job execution logic. It is simply used to fulfill the requirement that at least one metric is needed for a Google Analytics query.
  • Dimensions:Choose the dimensions on which to base the report. The default dimensions are transactionId,campaign, adwordsCampaignID and deviceCategory.
  • Filters: Optionally, choose filters from Google Analytics to filter the results you get from Google Analytics.
  • Interaction Type: By default SALES_ORDER is selected; for other interaction type, the number of orders and the order amount will not be displayed on the Performance tab for a campaign.

What’s the Result – Out of Box

Out of box, after the job regularly running, you can do the following:

  1. View the source campaign of the sales order from the Interactions facet of a contact.
  2. Build a target group that only includes contacts who made purchases resulting from a specific campaign.

What’s the Result – With Extensibility

You can easily achieve more with the flexibility and extensibility provided by SAP Marketing Cloud.

  1. You can enrich a business document interaction with other Google Analytics reporting dimensions besides source campaign and device category by doing the following:
    • Your administrator extends the structure of the interaction root with extension fields.
    • The customer namespace for the extended fields should be prefixed with GA_. For example,GA_CHANNELGROUPING. The system generates a field YY1_GA_CHANNELGROUPING_MIA in SAP Marketing Cloud.
    • You add channelGrouping as a dimensions parameter in the report, and the job execution logic fills the corresponding value.
  2. You can report on sales volume with reference to campaigns by creating custom CDS view. To do so, please follow the steps which are well described in this Blog: https://blogs.sap.com/2017/04/06/how-to-report-on-interactions-for-sales-orders-with-reference-to-campaigns/.
  3. You can run email campaigns which send out emails with UTM parameters for Google Analytics. To do so, please follow the steps which are well described in this Bloghttps://blogs.sap.com/2017/03/29/multiple-url-parameters-in-email-templates-in-sap-hybris-marketing-cloud/.

Prerequisites

  1. The business document interactions must be imported into SAP Marketing Cloud before the enrichment.
    • The communication medium of sales order or travel booking interactions must be BUSINESS_DOCUMENT. For more information about creating and changing interactions using the OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV, see the Data Management Upload Interfaces Guide on http://help.sap.com/mkt Integration > Data Management > Upload Interfaces Guide > Introduction
  2. Your web shop must be connected with Google Analytics, and standard e-commerce or enhanced e-commerce tracking must be implemented. For example, your e-commerce transaction information must be sent to your Google Analytics account.

    Save and run the custom report which shall return some results:

  3. The integration between your SAP Marketing Cloud system and your Google Analytics account must be set up. For more information, see the Integration with SAP Marketing Cloud – Google Analytics and SAP Cloud Platform Integration guide on http://help.sap.com/mkt under Integration.
  4. Assign any external campaigns to the corresponding campaigns in SAP Marketing Cloud.

Architecture of integration

On SAP Marketing Cloud the integration scenario SAP_COM_0079 describes the setup in more detail.

See how it is embedded into SAP Marketing Cloud:

Assigned Tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Joyca Vervinckt
      Joyca Vervinckt

      Hello,

      Thank you for this interesting blog.

      Is this scenario also available for on-premise hybris marketing?

      Kr,

      Joyca

      Author's profile photo Xuebo Liang
      Xuebo Liang
      Blog Post Author

      Hi Joyca,

      Yes, it will be available for on-premise 1708 release.

      Regards,

      Xuebo

      Author's profile photo Deepu Pankaj
      Deepu Pankaj

      Hello Xuebo,

      Can you confirm the availability for On-premise 1708 version

      Regards,

      Deepu Pankaj

      Author's profile photo Christopher Guenther
      Christopher Guenther

      Hello,

      Can someone give some insight on what steps need to be executed on-premise after the RFC connection to CPI was created? Where do I maintain the customizing as I can't find a "Marketing Application Jobs" app in Hybris Marketing 1709SP01.

       

      Regards Christopher.

      Author's profile photo Mark Bernabe
      Mark Bernabe

      Hi Xuebo,

      Can you confirm if this iFlow is solely for enriching sales order data or if it can also be used to bring Clickstream data in Google Analytics into Hybris Marketing? Thank you.

      Author's profile photo Michael Rey
      Michael Rey

      Hi Mark,

      Also other business documents can be enriched by using Google Analytics data.

      In standard we have not designed it to deliver clickstream data. Google Analytics doesn’t deliver user IDs along with the data, hence the clickstream data would not carry an ID that we can use to attach it to a contact profile.

      Our integration is built on the idea that a business document carries a document ID like a sales order or a booking code. When this business document is loaded from CRM or the commerce shop, then Google Analytics just needs to add the campaign information to it. The link to the user data already comes from the CRM or commerce shop and doesn’t need to come from Google Analytics.

      Hope that helps.

      Michael

       

      Author's profile photo Mark Bernabe
      Mark Bernabe

      Hi Michael,

       

      Makes sense. Thanks for the response!

      Author's profile photo Sanjeev Pandey
      Sanjeev Pandey

      Will this work for integration between SAP Business One and Google/FB  ad campaigns?

      Author's profile photo Ankita Walsinge
      Ankita Walsinge

      Hi Michael,

       

      We have a scenario where, we don't have sales order or any document type, but wish to integrate Google Analytics to bring in the data to Hybris Marketing in the form of reports. Is it possible to by any means to do that with the current version?

      Author's profile photo Xuebo Liang
      Xuebo Liang
      Blog Post Author

      Hi Ankita, with 1902 release, a configuration app is provided so that you can specify the set of web hits data that you want to retrieve from Google Analytics or Google BigQuery (with Google Analytics 360 license) , and interactions can be created in SAP Marketing system.

      Author's profile photo Matt Varone
      Matt Varone

      Can you please reference documentation for this. thanks

      Author's profile photo Xuebo Liang
      Xuebo Liang
      Blog Post Author

      https://help.sap.com/viewer/fb595d8341b54c4d8803a60fe3f49564/latest/en-US/14a3030dedc24c3eae37ba5f12b4508d.html

      https://help.sap.com/viewer/ac1eab4c66bc490da7ac2c378c46b0e7/latest/en-US/a501fa137b554912a1bb4f2d27395134.html

      Author's profile photo Andreas Walter
      Andreas Walter

      Hi Xuebo,

      I have a question regarding the video you linked below your blog. In the very end of the video (~2:34 min), the campaign success (performance) tab is shown with 2 custom tiles, "Number of Order" and "Order Amount". Are such custom tiles only available with Google integration scenario "Interactions: Enrich Sales Orders with Google Analytic" or also with scenario "Interactions: Create Interactions with Google Analytics Queries"?

      Because we are using the 2nd approach and the customer is asking, if we can add the metrics we receive from Google, directly to the campaign success also. Currently we only have CDS view and Analytical Query as reporting possibilty for this.

       

      Thanks and regards

      Andreas

      Author's profile photo Xuebo Liang
      Xuebo Liang
      Blog Post Author

      Hi Andreas, the 2nd approach shall also work, as long as: 1) from Google Analytics, you can query back dimensions such as Transaction ID, User ID, Campaign, Timestamp and metric Revenue 2) you set up a proper query configuration and create interactions with interaction type SALES_ORDER and properly map Google Analytics fields with interaction fields

      Author's profile photo Mikhail Naumov
      Mikhail Naumov

      Hi all, we are trying to import data from Goggle BigQuery using standard integration.
      It looks like it’s only possible if BigQuery data are coming from Google Analytics which is not our case.
      We upload data to BigQuery directly from ecommerce web site without using Google Analytics.
      This limitation looks very strange and artificial, can anyone confirm and explain reason behind this?

      Author's profile photo Xuebo Liang
      Xuebo Liang
      Blog Post Author

      Hi Mikhail, please refer to this documentation https://help.sap.com/viewer/ac1eab4c66bc490da7ac2c378c46b0e7/2008.500/en-US/bf37f04c8bf7430fabd63fdecd0187a1.html

      The integration only supports Google BigQuery datasets imported with Google Marketing Platform Analytics 360.

      Author's profile photo Valentine Irna
      Valentine Irna

      Hi Xuebo

       

      For the Enrich Sales Order Scenario, Is it possible to use this job/scenario if the sales order ID (Source object ID) of the business document is not the same with transaction ID from GA?

      However In the Sales Order interaction, we replicate the transaction ID into standard field "Additional Source Object ID". 

      Can we still use Enrich Sales Order with Google Analytic scenario for this case?

      Thanks,

      Irna