如何将Angular Repeater指令中的变量包含到Google跟踪代码管理器push方法中?

我正在尝试将数据从Angular指令推入google标记管理器脚本。我希望在Google Analytics(分析)中使用此数据。我使用datalayer.push方法向GTM发送我的自定义事件。

<span style="display: block" *ngFor="let r of option_rg">
     <input type="radio" name="rg_radio" [value]="r.value"[(ngModel)]="a" 
      onclick="dataLayer.push({'event' : 'custom event','dataToBeIncluded' : r.label   });"/>
                {{r.label}}
</span>

````

The event works by itself,yet if I want to have the variable 'dataToBeIncluded' with the data from 
the control it does not work. 

How can I use component properties in Angular to work with Google Tag Manager's dataLayer.push method?


higays1 回答:如何将Angular Repeater指令中的变量包含到Google跟踪代码管理器push方法中?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3165506.html

大家都在问