User Device In the Data Layer: Examples

Our custom Listeners make it easy to generate data layers based on user activity and characteristics - in real-time, fully automated, and without any programming required. Check out the examples below of data pushed by the User Device Listener.

User Device Data Layer Examples

Learn more about how ListenLayer generates powerful data layers from the activity on your website, specifically User Device details.

Custom Data Layer Events

Once enabled, the User Device Listener pushes an event called “userDevice” into the data layer whenever a session begins. Use this as a trigger to identify when data is available and capture via Google Tag Manager. You can also write rules in ListenLayer to customize the data layer details.

event: 'userDevice'

Automatic Data Layer Values

Along with the event above, ListenLayer pushes details about a visitor’s device into the data layer.

Device details and characteristics include:

  • Device family, type, and manufacturer
  • Browser and browser version
  • Operating system, including detailed version information
  • Screen size, resolution, and colors
udAutomaticValues: {
    device: {family: "Other", type: "Desktop", manufacturer: "Apple"},
    browser: {family: "Chrome", versionDetail: "96.0.4664.110", versionGeneral: 96},
    operatingsystem: {family: "Mac OS X", versionDetail: 10, versionGeneral: "10.15.7"},
    screen: {
      resolution: {width: 4607.9998779296875, height: 2591.999931335449},
      size: {availWidth: 2560, availHeight: 1415},
      colors: 24
   udLocation: {
      url: "",
      tld: "",
      hostname: "",
      pathname: "/",
      queryString: "?gtm_debug=1640120420011",
      parameters: {gtm_debug: 1640120420011},
      fragment: null,
      protocol: "https",
      originPathName: ""

Custom Data Layer Values

Write rules inside ListenLayer to push additional custom values into the data layer or to store the user’s device details in the browser so the information will persist over time.

udCustomValues: {
  //customer values you control appear here