Professional Documents
Culture Documents
Local Containers
Olay Swiffer PGEveryDay CrestWhiteSmile Align Enable management of tags to meet individual
tracking requirements of each website
Global Tagging Architecture
• P&G uses Google Tag Manager (GTM 360) as our tag management platform
• P&G has built a global solution used across all consumer-facing websites
• Our GTM architecture consist of two types of containers: a global container and a local container
• Every consumer-facing website should have a global container implemented
• Local containers are optional and used for additional tagging needs
• There are two global containers to choose from: Basic or Advanced
Global vs. Local
Global Container
• The global containers are used across all consumer-facing websites
• The global container deploys all core tracking tags that are commonly used across consumer-facing
websites
• It also deploys P&G's data privacy solution to be compliant with data privacy laws like GDPR &
CCPA
Local Container
• This is used to deploy any additional tags needed on your individual website that is not deployed via
the global container
• The local container is implemented via the PGdataLayer.GTM object using the SiteLocalContainer
attribute
PGdataLayer vs. dataLayer
DataLayer
• JavaScript object used to store information you pass to it from the website
• This information can then be used to populate variables and configure triggers in your tags in GTM
PGdataLayer
• Custom defined on-page JSON object used to provide data for GTM tags
• The PGdataLayer has over 100 standardized variables and parameters defined by the central Web
Analytics (Please see PGdataLayer Specification spreadsheet in appendix for more info)
• PGdataLayer.GTM is the object used to tell the Global containers how/if tags should fire
• The PGdataLayer is also leveraged by local tags (ex: Retention Science)
PGdataLayer.GTM Object
<!-- BEGIN PGdataLayer -->
<script type="text/javascript"> • PGdataLayer.GTM object must be placed on all
if(typeof PGdataLayer == "undefined"){
var PGdataLayer = {};
pages
}
PGdataLayer.GTM ={
• Each setting within the PgdataLayer.GTM object
'SiteBrand': 'Olay', must be updated to reflect your website
'SiteCountry': 'US',
'SiteEnvironment': 'Prod', • Some settings are informational, while other
'SiteHost': 'BigCommerce',
'SiteTechnicalAgency': 'MindTree', settings will enable tags within the global container
'SiteLocalContainer': 'GTM-ABC123',
'GoogleAnalyticsLocal': 'UA-111111-1', • See appendix for a full list of PGdataLayer
'GoogleAnalyticsAllowLinker': '', settings/attributes
'GoogleAnalyticsLinkerDomains': '',
'ConsentOverlay': 'OneTrust',
'ConsentOverlayID': '12345678912345',
• SiteLocalContainer: used to enable your website's
'SitePrivacyProtection': 'CCPA', local GTM container
'GoogleReCaptcha': 'false',
'FacebookRemarketingID': '123456789012345', • If you don't have a local GTM container, leave this
'FacebookConnectAppID': '', value blank
'FacebookConnectLocale': '',
'GoogleAnalyticsDisabled': '',
'Segment': 'A1b2C3d4E5f6G7h8I9j0x',
• GoogleAnalyticsLocal: used to enable Google
'Lytics': 'T1u2V3w4X5y6Z7a8B9c0', Analytics, and sends data to the correct property by
'Monetate':
'//se.monetate.net/js/2/a-6eac1087/p/widgets.com/entry.js' specifying your UA tracking ID
}
</script>
<!-- END PGdataLayer -->
Global Advanced Container Configuration
• BigCommerce is not on
P&G's standard hosting
• The global container needs
to manually inserted
• Examples of standard
platforms using P&G's
standard hosting:
• Brand.com
• Multibrand
• ModernWeb
Choose the “Manually add Google Analytics tracking Code” option under
the Google Analytics tab
BigCommerce Implementation
• Insert the PGdataLayer script on slide 3 and the Advanced container on slide 4 into
BigCommerce in the Advanced Settings area under the Web Analytics section
• If site has ecommerce, use the standard ecommerce script on slide 7 or enhanced
ecommerce implementation on slides (x-x)
Enhanced
• Track your consumer's entire journey throughout the site
• Track data on:
• Adding products to cart
• Payment method
• Shipment details
• Order review
• Checkout
• EE allows you to see funnels and build audiences off this data
Event_buy_now_add_to_cart Add
Event_buy_now_choose_product Click
Event_remove_from_cart Remove
Event_checkout_now Checkout
• These events should be implement via the CSS class or PGdataLayer.events object
(please see event tracking guide in appendix for more details)
Example Code
PGdataLayer.ecomm ={
'step': '2',
'options': 'Visa'
}
EE Products Object Array Settings
Example Code
PGdataLayer.ecomm ={
'step': '',
PGdataLayer.ecomm.products[]
'options': '',
'products':[{ • PGdataLayer.ecomm.products must be updated to include
"sku": "SK2-HR-FT-ESS",
"name":"SK-II Facial Treatment Essence",
information on all products displayed on a page
"brand":"SK-II",
"category":"our-products", • PGdataLayer.ecomm.products must be updated on an order
"position": "1",
"quantity": "1", confirmation page to include information on all products
"price" : "229.0",
"product_coupon": "",
purchased on the order
"product_coupon_value": "",
"recurrence": "", • See appendix for full list of ecomm.products settings in the
"listtype":"best-sellers",
"variant_sku" : "",
PGdataLayer Specification link
"product_discount_value" : "",
"product_discount" : "",
"bundle_products" : "",
"frequency" : ""},{ Where do I populate this code?
"sku": "SK2-HR-FT-MASK",
"name":"SK-II Facial Treatment Mask",
"brand":"SK-II",
• The products array should be populated on any page with
"category":"product-forms-masks", products, this includes PDPs, product category pages,
"position": "2",
"quantity": "1", checkout pages, reccommended items list, wish lists, etc.
"price" : "95.0",
"product_coupon": "",
"product_coupon_value": "",
"recurrence": "",
"listtype":"best-sellers",
"variant_sku" : "",
"product_discount_value" : "",
"product_discount" : "",
"bundle_products" : "",
"frequency" : ""}]
EE Transaction Object Settings
Transaction Object Settings:
• PGdataLayer.ecomm.transaction.id
• PGdataLayer.ecomm.transaction.store
• PGdataLayer.ecomm.transaction.revenue Example Code
• PGdataLayer.ecomm.transaction.tax PGdataLayer.ecomm ={
'transaction': {
• PGdataLayer.ecomm.transaction.shipping 'id': '827123',
'store': 'ACME Store3',
Where do I populate this code? 'revenue': '101.99',
'tax': '8.99',
• The transaction object must be updated on the website order
'shipping': '19.00',
confirmation page/ checkout complete page
'shipping_option': 'ground',
• The transaction.id must be set to the order number 'order_coupon': '',
• The transaction.revenue must be set to the order total amount 'order_couponprice': '0'
(including tax + shipping) }}
• See appendix for full list of PGdataLayer.ecomm.transation settings in
the PGdataLayer Specification link
Enhanced Ecommerce
Implementation
Examples & Testing
How do I test my EE Implementation?
• Please install the GA Debugger Chrome plugin, link can be found here
• This plugin will provide a detailed breakdown of each tracking beacon sent to GA in a readable format in
the JavaScript console (example shown below)
• Once this is configured in GA, you need to implement our enhanced ecommerce solution
• Update PGdataLayer.ecomm.step on each page of your checkout with the appropriate step number based on
your checkout funnel
How to Implement the Checkout Funnel
To collect where the user is in your website's checkout process, you must do the following:
• Implement PGdataLayer.ecomm.step and update the step to correspond with each section or page
of your checkout process
Example Code
'ecomm': {
‘step': '1',
'options':'',
'products': [{
'sku': '04620000002192',
'name': 'COVERGIRL Ultra Smooth Foundation + Applicator ',
'brand': 'Covergirl',
'category': 'Cosmetics',
'position': '1',
'creativetype': '',
'quantity’: '1' 'price': '16.99’;
'couponname': '’
'couponprice': ''
'discount': ''
'recurrence_type': 'one-time'
'product_listtype': ''
'variant': 'Soft Honey'
}]
}
Single Page Checkout Process
If your website has a single page checkout process, the web analytics team recommends the following
implementation:
• Option 1:PGdataLayer.ecomm.step is set to 1 and not updated, indiciating that there is only one
step
• Option 2: If the checkout page has multiple sections in the page, do the following:
• Treat the page like a single-page website
• Use virtualPageview events to manually send a pageview hit
• Update PGdataLayer.ecomm.step with appropriate value
• Update PGdataLayer.page.url with the virtual page url to be use for the section/step
• Implement a dataLayer.push of the virtualPageview to send hit to GA
GA Global Goals for DTC
Stores
How to Implement Global Goals?
• The Advanced Global GTM container includes an event management framework that
handles the flow of standard (consumer actions) events across our MarTech ecosystem
• There are 3 different methods if implementing these standard events:
• CSS Class
• dataLayer.push()
• PGdataLayer.event[]
• There are ~130 standard events defined around specific "consumer action" types and
subtypes as defined in our CRM platform
• A full list of these events can be found in the appendix section
• Please review the Consumer Actions & Standard Events guide in the appendix section for
a detailed guide on how to implement standard events
Global Goals Overview
Goal Name Type Category Equals Action Equals • The highlighted global goals are
1 Acquisition Complete Event applicable to most DTC
event_crm_action event_profile_register_complete
websites
2 Add to Cart Intent Event event_bin_action event_buy_now_add_to_cart
• You should implement all
3 Trial (sample) Intent Event event_sample_action event_sample_request 14 goals if it's applicable
4 Trial (coupon) intent Event event_coupon_action event_coupon_request for your website
5 Purchase Intent Event event_bin_action event_buy_now • Global goals are setup in your
6 Purchase Complete Event event_bin_action event_buy_now_checkout_complete Reporting View by default
7 Watch a Video Event event_informational_action event_video_play • Goals 15-20 are reserved for the
8 Exit to Social Site Event event_social_action event_socialmedia_exit Web Analytics' team future use
9 Trial (coupon) printed Event event_coupon_print|event_coupon_request_sca • If you want to setup custom
event_coupon_action
n|event_coupon_request_card
goals, please submit a ticket via
10 Submit Review Event event_ratings_action event_submit_review dpops.pg.com 🡪 Web Analytics
11 Sweepstakes Event
event_sweepstakes_action event_sweepstakes_complete • The following global goals can
Complete
12 Viewed an article Event event_informational_action event_view_article_page
be implemented using the
'Consumer Actions & Standard
13 Viewed a product Event
page
event_informational_action event_view_product_detail_page Events" guide in the appendix
14 POME Action Event
event_informational_action event_online_tool_start
Online Tool
Event Triggering Methods
CSS Class: JS listener code loaded via GTM executes send(onClick) of objects with standard CSS classes.
<a class="event_buy_now" data-action-detail="Shop
Now" href="/en-us/products"><span>Shop Now</span></a>
dataLayer.push(): Website initiates dataLayer.push() command to share event details with GTM for sending.
Primarily used for sending non-standard events to your GA property.
dataLayer.push({
'event': 'customEvent',
'GAeventCategory': 'event_bin_action',
'GAeventAction': 'event_buy_now',
'GAeventLabel': 'Shop Now',
'GAeventValue': 0,
'GAeventNonInteraction': false
});
PGdataLayer.events[]: JSON object in page source is read by GTM (on page load) and event is sent to GA.
Primarily used for non interactive events (ex: viewed a product page).
PGdataLayer.event=[{
'category': 'event_bin_action',
'action': 'event_buy_now',
'label': 'Shop Now',
'value': 0,
}]
DTC Standard Events
event_bin_action event_buy_now
event_bin_action event_buy_now_choose_retailer
• These are additional standard
event_bin_action event_buy_now_choose_product events that can be used on DTC
event_bin_action event_buy_now_eretailer_exit websites
event_bin_action event_where_to_buy
event_bin_action event_buy_now_add_to_cart • Implement any events that are
event_bin_action event_buy_now_checkout_complete applicable to your website
event_bin_action event_remove_from_cart
event_bin_action event_view_cart • Please see full list of standard
event_bin_action event_preview_cart
events in appendix
event_bin_action event_checkout_now
event_bin_action event_update_quantity
event_bin_action event_out_of_stock
event_bin_action event_product_quickview
event_bin_action event_buy_now_add_to_wishlist
event_bin_action event_continue_shopping
Goal 1: Acquisition Complete
<div class="card-text">
<a href="https://www.olay.com/cart.php?action=add&product_id=595"
data-event-type="product-click" class="button button--small button--primary event_buy_now_add_to_cart"
data-product-id="595" data-action-detail="00075609196379">Add to Bag</a>
</div>
Goal 5: Purchase Intent
...
• Purchase Compelte
PGdataLayer.event =[{ (event_buy_now_checkout_compelte) is one of P&G's
'category': 'event_bin_action',
'action': 'event_buy_now_checkout_complete', global GA goals
'label': '',
'value': 0 • This event should be sent using
}]
... the PGdataLayer.event[] method since this will be sent
on the order compelete page
• This event will help you understand how many
consumers compelted a purchase
Goal 10: Submit Review
<img
src="https://haircodestorageprod.blob.core.windows.net/assets/images/Branding/H
airCode_Logo.png" class="inViewImg hc-haircode-logo-i hc-img-loaded"
event_product_consultation_reco data-action-detail "RECO PRODUCT"
title="HairCode" alt="HairCode">
Event_plan_frequency
• The standard event:
event_plan_frequency can be used on
your plan frequency buttons (see
screenshot for example)
• You can set the event label
(data-action-detail) to the plan
frequency (3 mo, 6 mo, etc.) to
understand how often your consumers
are purchasing a certain item