英文:
Google Tag Manager: how to send a custom array to GTM so that a proper custom report can be built in Google Analytics
问题
dataLayer.push({
event: 'answer_survey_q2',
answer_keys: ['ans_q2_1', 'ans_q2_3', 'ans_q2_5']
});
英文:
I would like to ask a question about GTM, but no ecommerce items array object, we hope to built a custom report with custom data sending to GTM and GA.
We have a multiple answer question in our survey, we want to sent the answers to GTM after getting feedback from customers. Finally, sending the data to GA to build a custom report.
I plan to format the data like this:
dataLayer.push({
event: 'answer_survey_q2',
answer_keys: ['ans_q2_1','ans_q2_3','ans_q2_5']
});
However I don't know how to define a variable in GTM so that in GA I can build a report like:
Do you have any suggestion?
答案1
得分: 0
目前或将来可能都没有“array”类型。
要实现您想要的功能:
-
将所有可能的选项拆分为事件参数。在免费版本中只有50个事件参数配额,在GA360版本中有125个。所以这是一种选择,但没有人会推荐这种方式。
-
将其接受为“String”类型。所以值可以是
a, b, c
a
b
然后您需要在Google表格或Excel中自行分析。
英文:
There are no array
type currently or maybe not in the future either.
To achieve what you want :
-
Splits all the possible option to event parameter. There are only 50 event parameters quota in Free Version and 125 in GA360 version. So it's an option but no one will recommend this way.
-
Accept it as
String
type. So the value might be
a, b, c
a
b
And you need to do the analyze in GoogleSheet or Excel on your own.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论