Angular 在GTM中发送数组对象

Angular 在GTM中发送数组对象,angular,google-analytics,google-tag-manager,Angular,Google Analytics,Google Tag Manager,我在Google Analytics中有三个维度和一个度量,我在Google tag manager的帮助下填充这些维度和度量,我在Google tag manager中创建了一个标记,该标记在特定事件上执行 在我发送单个对象之前,它一直工作正常 (<any>window).dataLayer.push({ AgentEmail: 'bbj@gmail.com', AgentLocation: 'Delhi', AgentName: 'Agent0

我在Google Analytics中有三个维度和一个度量,我在Google tag manager的帮助下填充这些维度和度量,我在Google tag manager中创建了一个标记,该标记在特定事件上执行

在我发送单个对象之前,它一直工作正常

(<any>window).dataLayer.push({
      AgentEmail: 'bbj@gmail.com',
      AgentLocation: 'Delhi',
      AgentName: 'Agent0007',
      AgentCount: '100',
      event: 'agentInfo'
    });
(窗口).dataLayer.push({
代理邮件:'bbj@gmail.com',
代理商地址:“德里”,
AgentName:'Agent007',
代理帐户:“100”,
事件:“agentInfo”
});
但是,当我试图发送一个数组对象时,我无法执行相同的操作,即如果我想发送两个代理的信息,那么它只保存一个信息

  (<any>window).dataLayer.push({
      AgentEmail: 'z@gmail.com',
      AgentLocation: 'Delhi',
      AgentName: 'Agent0007',
      AgentCount: '100',
      event: 'agentInfo'
    },({
       'AgentEmail': 'z@gmail.com',
     'AgentLocation': 'Delhi',
     'AgentName': 'Agent0008',
      'AgentCount': '100',
     'event': 'agentInfo'
 });
(窗口).dataLayer.push({
代理邮件:'z@gmail.com',
代理商地址:“德里”,
AgentName:'Agent007',
代理帐户:“100”,
事件:“agentInfo”
},({
'代理邮件':'z@gmail.com',
“代理位置”:“德里”,
“AgentName”:“agent008”,
“代理帐户”:“100”,
“事件”:“代理信息”
});
即使我尝试创建两个独立的数据层对象,并尝试以不同的方式发送这两个对象,但这也不起作用


请告诉我在GTM标记/变量和前端中需要做哪些更改以填充数据层。

在对象之间有一个额外的括号boi”()

dataLayer.push({
      AgentEmail: 'z@gmail.com',
      AgentLocation: 'Delhi',
      AgentName: 'Agent0007',
      AgentCount: '100',
      event: 'agentInfo'
    },{ //here you need to remove the "("
       'AgentEmail': 'z@gmail.com',
     'AgentLocation': 'Delhi',
     'AgentName': 'Agent0008',
      'AgentCount': '100',
     'event': 'agentInfo'
 });

您好,很抱歉延迟回复。同时,即使我按照您的建议进行回复,也只是将单个元素推送到GTM标记。而在数据层,它显示了两个对象,您知道如何实现相同的效果吗