Google Tag Manager: how to send a custom array to GTM so that a proper custom report can be built in Google Analytics

huangapple go评论54阅读模式
英文:

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:
Google Tag Manager: how to send a custom array to GTM so that a proper custom report can be built in Google Analytics

Do you have any suggestion?

答案1

得分: 0

目前或将来可能都没有“array”类型。

要实现您想要的功能:

  1. 将所有可能的选项拆分为事件参数。在免费版本中只有50个事件参数配额,在GA360版本中有125个。所以这是一种选择,但没有人会推荐这种方式。

  2. 将其接受为“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 :

  1. 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.

  2. 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.

huangapple
  • 本文由 发表于 2023年5月10日 20:27:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76218424.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定