Use a data layer to set Analytics variables in Experience Platform tags
- Topics:
- Tags
CREATED FOR:
- Beginner
- Developer
Learn how to pull values out of the data layer and use them in Experience Platform tags to populate variables in Adobe Analytics. Using a data layer for Analytics and other Experience Cloud solutions is a best practice.
Review additional information about data layers in the Analytics and Experience Platform tags documentation.
Transcript
In this video, I’ll review using a data layer to set analytics variables in tags. This is what I’ll cover. I’ll start by explaining the purpose and benefits of using one. We’ll look at a data layer used on the Lumo retail site. Then I’ll hop over to tags to create new data elements that store some of these data layer values, followed by adding a rule to send those new data points to analytics. And then last, I’ll wrap up by validating that those new data points are being sent in from the Lumo website. A data layer is a JavaScript object implemented on a website that acts as a middleman. It standardizes the data you want to collect into other tools like analytics, and it facilitates communication between a website and a tag management system like tags. Now, for companies not using a data layer on their site, this can lead to some issues over time. First, separate implementations for each marketing technology vendor introduces redundancy so it becomes very inefficient. Next. Each martech vendor typically has some differences in how they define events, so the data across vendors can become inconsistent. Third, separate implementations for each martech vendor leads to performance issues on your website over time. Now, on the flip side, companies that use a data layer reap some benefits. First, the data layer, if designed properly, surfaces key data points in a vendor agnostic way. Second, the data is standardized so can support the full martech stack and eliminate inconsistencies of data. Third, implementing a single data layer means your website will be more performant because all martech vendors use the same set of variables and events. This is the Luma Retail website used in many Adobe tutorials. Let’s take a look at the source for this page. At the top in the head section. There’s the tags library script. This is the ideal placement, especially if you use tools like Adobe Target. It’s loaded asynchronously so the rest of the page will continue to render and it won’t be held up. Right above the library is the data layer. This site uses the W3C Digital Data Layer, which uses a JavaScript object with digital data being the root object, and then sub objects branching from it to define attributes for things like the page and category. Your organization may use something completely different for a data layer. Adobe even has its own data layer called the AC DL, which stands for Adobe Client Data Layer, and it’s an event driven one as compared to the object based one like this W3C version. Whatever you want to use is fine, but we do recommend that you use a data layer, and that is the best practice for analytics and other Experience Cloud solutions. What I’ll show you next is how to set analytics, page name and channel variables with values from this data layer, and then send them into analytics. We’ll be pulling them from the page and category objects. Here’s the page name value. And here’s what we’ll pass in to the channel variable. I’ll just mention now that implementing the data layer and associated values is an activity done by your development team. If you worked with Adobe consultant or a partner consulting firm to help you define your analytics data collection requirements, then you’ll have two key documents that will help a solution design reference and a text spec. You’d pass these off to your development team to help them implement part of the data layer. Jumping into the tags interface, and I’ll show you that the basic configuration for analytics is already set up. I have the library management set to manage the library for me, and I have my reports suites defined below that in the general section, I have my tracking server defined as well. Now there’s a rule set up for the campaign tracking code, and there’s some data elements in here, but nothing for page name or channel. And there’s no rule for sending an analytics beacon. Back in the Luma website. I need to understand how to reference the data attributes I’ll need for setting up my data elements. How open developer tools, and in the console I’ll start typing in digital data. This shows me the objects available from the route. I’ll continue by typing in page. Same thing. I’m going deeper into the object path. I’ll type in page info and then finally page name. Once I hit enter, it returns the value for that attribute. This is the path I’ll use for creating a new data element for page name, so I’ll copy this to use. Once I’m back in tags. Now, I’ll grab the category value I’ll use to set the analytics channel variable. I’ll type in digital data and then page followed by category and ending with type. When I press enter, the value is returned. I’ll copy the path to this value as well. To have handy. Once I’m back in tags. In tags, I’ll start by creating my two data elements for page name and channel. I’ll select add Data Element in the upper right corner. I’ll name it Page name. The default extension here is core and that’s what I’ll use. It’s a JavaScript element type. So I’ll select that. Last I’ll paste in the data layer path I copied in the previous step. All right. Now I’m going to go ahead and set up the site section. Again I’ll give it a name. And I’ll paste in the data layer path that I copied previously for this site. All right. At this point I’ve created the data elements that will store the respective values from the data layer. Now I need to create a rule to send this data into an analytics beacon. So I’ll select Add rule at the top. I’ll enter a name. Now I need to configure an event. Essentially when do I need to execute this rule. There’s a lot of options here, but I need to send this data for every page view. So I’ll choose Dom ready under page load. The tags library is loaded async in my property. So page bottom doesn’t apply in this case. Now here in the advanced options the order is set to 50. If you have other rules that set analytics variables that you want to merge in with the beacon I’m setting up here. Then the order number should be higher than that of any of the other rules. Now I’ll select the analytics variables with the data layer attributes. This is done in the actions section. Under extension I’ll select Adobe Analytics. I’ll choose set variables from the action type. And then to the right I’ll set up the analytics variables that will be set from page name and site section.
Okay. Last I need to send the beacon. I’ll add an action at the bottom to the right of set variables. I’ll select Adobe Analytics for the extension. Then I’ll choose Send Beacon as the action type. I’m sending a page view. So the first option S-T is correct. Now I’ll save my changes. At the top I’ll add a new working library and add all my changed resources to it. And then I’m going to save and build this to my development library. Now I’m going to test my code on the Luma website. First I’ll refresh the page and then I’ll open the browser’s development tools. On the console tab I see my new rule fired, and above it I see var for channel and page name included as data points sent in. This concludes using a data layer to set analytics variables and tags. You should now understand how to create data elements and rules to send these data points to Adobe Analytics. Good luck!
Analytics
- Analytics tutorials
- Introduction to Analytics
- What is analytics
- What Can Adobe Analytics Do For Me?
- How Adobe Analysis Workspace Can Change Your Business
- It’s More Than Data. It’s Customer Intelligence
- Adobe Sensei and Adobe Analytics
- Customer Use Case - ServiceNow
- Customer Use Case - Accent Group
- Customer Use Case - The Home Depot
- Summit 2019 Super Session - Travel and Hospitality
- Summit 2019 Super Session - Retail
- Summit 2019 Super Session - High Tech
- Strategy & thought leadership
- Transitioning from other platforms
- Analytics Basics
- Customizing the UI
- Getting Help
- Analysis Workspace
- Analysis Workspace Basics
- Analysis Workspace quick intro
- Analysis Workspace overview
- Navigate the new landing page
- Start your analysis with a pre-built report
- Building a Workspace project from scratch
- Create and manage custom templates in Analysis Workspace
- Understanding how data gets into your Analysis Workspace project
- Foundational metrics in Adobe Analytics
- Component management in Analysis Workspace
- Selecting a report suite in Analysis Workspace
- View Analysis Workspace performance metrics
- Create bot reports
- Tips and Tricks
- Navigating Workspace Projects
- Data Dictionary in Analysis Workspace
- Starting your first project
- Training tutorial template
- Use folders in Analysis Workspace
- Copy and insert panels and visualizations
- Create a table of contents
- Right-click for Workspace efficiency
- Keyboard shortcuts
- Annotations
- View density
- Use filters
- Use multi-select drop-down filters
- Real-time reports
- Using Panels
- Using Tables, Visualizations, and Panels in Analysis Workspace
- Quick Insights Panel in Analysis Workspace
- Using the Attribution IQ Panel
- Media Concurrent Viewers Panel in Analysis Workspace
- Media Playback Time Spent Panel
- Using Drop-down Filters
- Using Panels to Organize your Analysis Workspace Projects
- Choose segments for a panel
- Multiple Report Suites in Analysis Workspace
- Next/Previous and Page Summary Workspace Panels & Reports
- Understanding attribution panel and lookback windows
- Building Freeform Tables
- Understand your data–freeform tables
- Use the left rail to build freeform tables
- Easy drag and drop to blank projects
- Work with dimensions in a freeform table
- Work with metrics in a freeform table
- Row and column settings in freeform tables
- Freeform table totals
- Use the freeform table builder
- Right-click for workspace efficiency
- Reorder static rows
- Use Attribution IQ in freeform tables
- Cross-sell analysis
- Freeform table filters
- Time-parting dimensions
- Visualizations
- Visualization types and overview
- Visualization use cases
- Data visualization playbook
- Getting data into visualizations
- Using component drop-downs in Workspace
- Area and area stacked visualizations
- Bar and bar stacked visualizations
- Bullet graph visualization
- Donut visualization
- Histogram visualization
- Unlocking insights with histograms
- Line visualization
- Combo charts
- Adding trend lines to line visualizations
- Map visualization
- Summary number and summary change visualizations
- Key metric summary visualization
- Text visualization
- More than words - Using text visualizations and descriptions
- Scatterplot visualization
- Treemap visualization
- Venn diagram visualization
- Use the cumulative average function to apply metric smoothing
- Flexible layouts
- Changing the scale/axis on visualizations
- Dimension-graph live linking
- Set the granularity for visualizations
- Link inside or outside of your project
- Customize visualization legends
- 100% stacked visualizations
- Table and visualization data source settings
- Build a time-parting heatmap
- Analyzing Customer Journeys
- Applying Segments
- Apply segments to your Analysis Workspace project
- Apply ad hoc segments
- Use different Attribution IQ models with segments
- Choose segments for a panel
- Use segments as Dimensions in Analysis Workspace
- Use segments to limit data in Analysis Workspace
- Quick segments in Analysis Workspace
- Building Customer Journey Segments
- Building Customer Journey Segments - Part 2
- Metrics
- Dimensions
- Calendar and Date Ranges
- Curate and Share Projects
- Attribution IQ
- Using Cross-tab Analysis to Explore Basic Marketing Attribution
- Adding side-by-side comparisons of Attribution IQ Models
- Attribution IQ in Calculated Metrics
- Using Attribution IQ in Freeform Tables
- Using the Attribution IQ Panel
- Using different Attribution IQ models with segments
- Algorithmic Model in Attribution IQ
- Custom Look-back Windows in Attribution IQ
- Cohort Analysis
- Cohort Analysis in Analysis Workspace
- Understand your data–Cohort Tables
- Overview of Cohort Tables
- Cohort Table Settings
- Churn Analysis with Cohort Tables
- Cohort Analysis Using Any Dimension
- Latency Analysis with Cohort Tables
- Calculate Rolling Retention in Cohort Tables
- Use Cohort Analysis to Understand Customer Behavior
- Voice Analytics
- How to Manage and Track Your Voice Assistant App Data
- Understand Differences Across Voice-Enabled Devices
- Finding Opportunities To Increase Engagement for Voice Apps
- Reducing Error Rates and Improving Success Rates in Your Voice App
- Understand User Behavior on Voice Assistants
- Understanding the User’s Voice Journey
- Analysis Workspace Basics
- Administration
- Key Admin Skills
- Creating an empowered community
- Simplify and spend less time training users
- Getting the Right People on Your Analytics Team
- Gaining a seat at the table
- Telling impactful stories with data
- Translating Adobe Analytics technical language in a non-technical way
- Working cross-functionally
- Are you asking the right questions?
- Admin Tips and Best Practices
- Download the implementation playbook
- Audit your data dictionary
- Create standardized naming conventions
- Create standardized code templates
- Create basic videos and training
- Create an internal Adobe Analytics site
- Use a global report suite
- Create a news & announcements project
- Drive success with executive summary dashboards
- Create operational dashboards
- Company Settings
- User Management
- Manage Report Suites
- Configure general account settings
- Customize calendar settings
- Configure paid search detection
- Set up marketing channels
- Create marketing channel processing rules
- Manipulate incoming data with processing rules
- Configure traffic variables (props)
- Configure traffic classifications
- Configure hierarchy variables
- Configure events and variables
- Configure conversion classifications
- Configure list variables
- Configure finding methods
- Set internal URL filters
- Configuring zip and postal code settings
- Enable the timestamp optional setting
- Configure bot rules in Analytics
- Data Governance and GDPR
- Traffic Management
- Logs
- Key Admin Skills
- Implementation
- Implementation Basics
- Experience Platform Tags
- Implement Experience Cloud solutions in websites using Tags
- Basic configuration of the Analytics extension
- Configure library management in the Analytics extension
- Configure general settings in the Analytics extension
- Configure global variable settings in the Analytics extension
- Use custom code in the Analytics extension
- Use a data layer to set variables
- Use doPlugins and implementation plug-ins
- Configure easy download link tracking
- Configure easy exit link tracking
- Prepare Tags for your Analytics implementation
- Create data elements for the Analytics implementation
- Create a global page load rule
- Validate the global page load rule
- Create rules for special pages
- Create rules for success events
- Publish Tags libraries to stage and production
- Using JavaScript
- Components
- Segmentation
- Segment builder overview
- Finding and creating segments
- Rolling date ranges in segments
- Segment comparison in Analysis Workspace
- Segment containers
- Segment management and sharing
- Applying segments in Analysis Workspace
- Using segments as dimensions
- Using segments to limit data
- Differences between the segment builder and quick segments
- Sequential segmentation
- Before/After sequences in sequential segmentation
- Segmentation on distinct dimension counts
- Dimension models in segmentation
- Use ‘equals any of’ in segmentation
- Analytics Insider Webinar - Customer Segmentation Strategies
- Now just wait a segment… Using segmentation to discover new insights
- Calculated Metrics
- Calculated metric builder overview
- Calculated metrics - implementation-less metrics
- Calculated metrics - segmented metrics
- Calculated metrics - functions
- Approximate count distinct function in calculated metrics
- Quick calculated metrics in Analysis Workspace
- Manage your calculated metrics
- Attribution IQ in calculated metrics
- Use dimensions in calculated metrics
- Take your data analysis to the next level with calculated metrics
- Classifications
- Virtual Report Suites
- Activity Map
- Segmentation
- Additional Tools
- Exporting
- From the UI
- Data Warehouse
- Data Feeds
- Report Builder
- Upgrade and reschedule workbooks
- Add Segments to Multiple Requests at Once in Report Builder
- Anomaly Detection in Report Builder
- Edit Metrics across Requests
- Using Report Builder to learn the Adobe Analytics API
- Get started with Report Builder
- Schedule a Report Builder request
- Use Report Builder advanced delivery options for Power BI
- Integrations
- Experience Cloud
- Audience Manager
- Target
- Adobe Advertising DSP
- Configuring Advertising Analytics
- Implementing tracking templates into search engines
- Introduction to the Adobe Advertising DSP integration
- Create a Pre-launch campaign analysis
- Report on Advertising DSP marketing channels
- Create Analytics site journey profiles
- Create Analytics segments for activation and reporting
- Create Advertising DSP alerts with Adobe Analytics
- Create Analytics custom metrics with Advertising DSP data
- Create Advertising DSP site entry reports
- Create Advertising DSP dashboards
- Ad Hoc Analytics
- Power BI
- Magento
- Data Science
- Vertical-Specific
- Media Analytics
- Mobile App Analytics
- APIs
- Analysis Use Cases