For example, data layer object as follows:

var dataLayer = window.dataLayer || [];
var dataLayer = [{
    'products': [{
            'name': 'Gibson J-200',
            'tuning': 'High-G',
            'price': 449.75
            'name': 'Fender Stratocaster',
            'tuning': 'Drop-C',
            'price': 1699
    'stores': ['Los Angeles', 'New York'],
    'employee': {'name': 'Reggie'}

If you create a Data Element in DTM using array notations as the following figure, it returns default value configured as "DLJSDefault" instead of correct value "Gibson J-200":



Dynamic Tag Management/Activation


 While using the JavaScript Object Data Element type, Dynamic Tag Management does not support array notations.


To use array notations, use a Data Element of type 'Custom Script':


You can use the following script for the example scenario:

return window.dataLayer["0"].products["0"].name;

This script returns the value "Gibson J-200" from the example data layer.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책