Create a Data Element for Page Name

Data elements are tags’ version of a data layer. They can store values from your own data layer object, cookies, local storage objects, query string parameters, page elements, meta tags, etc. In this exercise, you will create a data element for Page Name, which you will use later in your Target and Analytics implementations.

To create a data element

  1. In the left navigation, click Data Elements

  2. Since you haven’t created any data elements yet in this property, a brief video appears with additional information on this topic. Watch this video, if you like.

  3. Click the Create New Data Element button:

    Click the Create New Data Element button

  4. Name the data element, e.g. Page Name

  5. Use the JavaScript Variable Data Element type to point to a value in your sample page’s data layer: digitalData.page.pageInfo.pageName

  6. Check the boxes for Force lowercase value and Clean text to standardize the case and remove extraneous spaces

  7. Leave None as the Storage Duration setting since this value will typically be different on every page

  8. Click the Save button to save the data element

    Create the Page Name data element .

NOTE
Data element capabilities can be extended with Extensions. For example, the ContextHub extension allows you to add data elements using features of the extension.