1

In our project we are already using Google Tag Manager for Google Analytic's, with that now we have to send events to Intercom also, How to set up event tracking in Intercom using Google Tag Manager instead of writing code in Project,Anyone have experience doing this with Intercom, can some one guide me in this

Note :: am Using GTM Mobile container Android v4

4

2 回答 2

2

1.在GTM Web界面中根据触发器定义函数调用标签,并根据需要使用参数,请查找函数调用标签配置的附件图像

在此处输入图像描述 在此处输入图像描述

2.在您的项目代码中创建一个类 IntercomActionEventsFunctionTagHandler 它将实现 FunctionCallTagCallback public class IntercomActionEventsFunctionTagHandler implements Container.FunctionCallTagCallback { @Override public void execute(final String functionName, final Map eventDataMap) { } }

3.注册您的 FunctionCallTagCallBack 加载 ContainerHolder containerHolder.getContainer().registerFunctionCallTagCallback("ActionEventsFunction", new IntercomActionEventsFunctionTagHandler());

4.当Ever Event被触发然后你的HandlerCode会自动获得Triggers然后最终在execute方法中记录你的KeyPairs映射到对讲机 Intercom.client().logEvent("ActionEvents", eventDataMap);

5.你的 Final class 将如下所示 public class IntercomActionEventsFunctionTagHandler implements Container.FunctionCallTagCallback { @Override public void execute(final String functionName, final Map eventDataMap) { Intercom.client().logEvent("ActionEvents", eventDataMap); } }

6.不要忘记在Web界面中创建版本或发布GTM配置更改

于 2016-08-25T08:17:24.380 回答
0

您必须使用Tags侧边菜单下的自定义 HTML 标签选项并编写 Javascript 代码以将事件发送到对讲机。这篇文可能会有所帮助

于 2016-08-25T02:06:52.300 回答