私の現在の分析のセットアップは次のようになります。React Routerを使用してGoogleアナリティクスにカスタムディメンションを追加するにはどうすればよいですか?
this.context.router.listen(location => {
analytics.page(location.pathname, {
title: document.title,
url: `${config.HOST_URL}${this.context.router.createHref(location)}`,
path: this.context.router.createHref(location),
referrer: document.referrer,
state: location.state,
});
});
location
オブジェクト内のデータの量はかなり少ないです。質問は、componentDidMount
ブロックに読み込まれたアイテムに関する情報をページトラッキングにどのように取得するのですか?
この特定の例では、ユーザーがGoogleアナリティクスを見ているアートワークに関する情報をカスタムディメンションとして追加しようとしています。以下のリンクは、通常どのように追加されるかを示しています。
https://support.google.com/analytics/answer/2709828?hl=en#example-hit
私は与えられた情報から、反応し、ルータをv2の