GA4 eコマース設定 | オンラインセミナー アーカイブ動画+テキスト起こし(2022年4月14日開催)

セミナーアーカイブ

GA4のeコマース設定については、2022年8月より、新しい方法が利用可能になりました。このページで紹介してある方法でも設定できますが、新しい方法では、設定に必要な工数が少なくなっておりますので、下記の記事もご参照ください。

2022年4月14日に開催さたオンラインセミナーの内容です。

当日のセミナー動画

このセミナーのテキストのダウンロードはこちらから

eコマース設定をしておくと、どんなことが分かるか

レポート > ライフサイクル > 収益化 > eコマース購入数

赤線の枠の表について解説します。

上記の(1)~(7)の解説が下記にあります。

No.項目意味
(1)アイテムの表示回数アイテムの詳細が表示された回数。
(2)カートに追加ユーザーがショッピングカートにアイテムを追加した回数。
(3)表示後にカートに追加された商品の割合カートに商品を追加したユーザー数を、同じ商品を表示したユーザー数で割った値。
(4)eコマース購入数ユーザーが購入手続きを完了した回数。
(5)表示後購入された商品の割合商品を購入したユーザーの数を、同じ商品を表示したユーザー数で割った値。
(6)商品の購入数量購入イベントに含まれる一つのアイテムの数量。
(7)アイテムの収益アイテム毎の合計収益(税金と配送料を除く)

たとえば「リンク先ページ(英語名:Landing Page)」の列を追加すると、入口ページ毎に、アイテムの販売状況を把握することができます。

(解説)「リンク先ページ」(英語画面でLandding Page)

本日の内容=eコマースに関わる9つのイベント

「 e コマース(GA4)デベロッパー ガイド」(公式ヘルプ: https://developers.google.com/tag-manager/ecommerce-ga4?hl=ja )では、eコマースに関わる9つのイベントの解説が掲載されています(左の表)。この9つのイベントは全て、第3回の「イベント設定」の回でご紹介した「推奨イベント:オンライン販売」(右の表)に含まれています。

※はじめに、第3回で取り上げたイベント「purchase」の設定を振り返ります。

推奨イベント 設定例 purchase

ここでは、当セミナーのサイトのセミナー登録完了ページを購入完了ページ見立てて、下記のような構成で、推奨イベント、purchaseを設定してみます。

データレイヤーに書き込まれた情報を、GTMで取得して、GA4に送信します。

「どうしてもデータレイヤーが必要なのか?」については、弊社GA4サイトの解説記事もご参照ください。

purchaseのdataLayerの書き方

公式ヘルプ:
https://developers.google.com/tag-manager/enhanced-ecommerce?hl=ja

(例)セミナー4回目の申し込み完了を、購入完了に見立てて、purchaseのdataLayerを書いている。

(備考)
「このテキストのdataLayerはGA4用のものとなっております。既にUAで拡張eコマースなど利用していてdataLayerが存在する場合、後述のGTMでの変数設定方法が変更となります。dataLayer側の記述をGA4用に書き直すか、あるいは、andaにご相談ください」

解説:window.dataLayer = window.dataLayer || [];

<script>
  window.dataLayer = window.dataLayer || [];
  dataLayer.push({
    event: "purchase",
    ecommerce: {
(以下省略)

window.dataLayer = window.dataLayer || [];

について解説します。

dataLayerはJavaScriptで「配列」と呼ばれるものになります。

「配列」は中にいろいろな要素をリスト形式で保有することができるもので、

そして「配列」はその要素を追加・削除・検索など行うことが可能です。

dataLayerは「継ぎ足し継ぎ足ししていく」のが本来的な使い方です。

 window.dataLayer = window.dataLayer || [];

は、「dataLayerという名前で配列を新規作成する」というものになります。

GTMはページ上にdataLayerという配列が存在したらそちらを利用する形です。

(存在しない場合はGTMが勝手に作成します)

そして、dataLayer.push()というのは上で触れた「配列に要素を追加する」ものとなり、()の中身をdataLayerに追加する、という文法になっています。 これによって、「作成した配列に対してpurchase用のデータを追加する」形になります。

推奨イベント 設定例 purchase GTMのデータレイヤー変数

データレイヤー変数の追加

 

「変数タイプを選択」で「データレイヤーの変数」を選択。

データレイヤー変数「ecommerce.transaction_id」の設定例です。

他の変数も同様に設定していきます。

資料:商品アイテム(itemes)データ

商品アイテム(items)の
パラメータ名
説明
item_id商品アイテム ID(SKU)
item_name商品アイテム名
quantityアイテムの数量
item_brand商品アイテムのブランド
item_category商品アイテム カテゴリ
item_category2商品アイテムに多数のカテゴリがある場合に利用します。
item_category3商品アイテムに多数のカテゴリがある場合に利用します。
item_category4商品アイテムに多数のカテゴリがある場合に利用します。
item_category5商品アイテムに多数のカテゴリがある場合に利用します。
item_variant商品アイテムのバリエーション
price指定された通貨パラメータの単位で表した商品アイテムの価格
currency通貨(3 文字の ISO 4217 形式)
tax取引に関連付けられた税金
affiliation仕入れ先業者や実店舗を指定する商品アフィリエーション
coupon購入に使用されたクーポンコード
discount購入に関連付けられた割引の金銭的価値

推奨イベント 設定例 purchase GTMのデータレイヤー変数

「ecommerce.transaction_id」と同じ方法で、イベント「purchase」で使用するデータレイヤー変数を一通り追加しました。

dataLayerを購入完了ページに相当するページに実装します。ここでは、セミナー申込完了を商品の購入完了に見立てて記述してあります。

(今回下記のdataLayerを実装したGA4のセミナーページ:
https://ga4-quick.and-aaa.com/ga4_seminar_thanks/ga4_thanks20220324.html)

トリガーのタイプは、「カスタム イベント」を使用しています。

イベント「purchase」のために、タグを新規で一つ作ります。設定は上記の通りです。

ライフサイクル > 収益化 > e コマース購入数

どのアイテムが幾つ売れたかがレポートで確認できます。

「 e コマース(GA4)デベロッパー ガイド」9つのイベントでストーリを見る

「 e コマース(GA4)デベロッパー ガイド」(公式ヘルプ: https://developers.google.com/tag-manager/ecommerce-ga4?hl=ja

公式ヘルプの一覧表だと、「買い物の流れ」をイメージしにくいかも知れません。

以下で「買い物の流れ」の例を見て、その順番に、Eコマースのイベントの設定例を見ていきます。

ECに関わるイベントの流れの例

(1) view_promotion

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/view_promotion.html

view_promotionDataLayer

「 e コマース(GA4)デベロッパー ガイド」(公式ヘルプ: https://developers.google.com/tag-manager/ecommerce-ga4?hl=ja

view_promotionGTM トリガー

トリガーのタイプは、「カスタム イベント」を使用しています。

view_promotionGTM タグ

(2) select_promotion

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/select_promotion.html

select_promotionDataLayer

「 e コマース(GA4)デベロッパー ガイド」(公式ヘルプ: https://developers.google.com/tag-manager/ecommerce-ga4?hl=ja

select_promotionの運用例をご紹介します。ここでは、「dataLayerを発火させる関数」と「リンク要素」で運用します。

こちらの関数は、ページ上のどこかに一回だけ記述します。「リンク要素」(後述)のdata-*****(次ページに掲載)を抽出し、それをdataLayerの形式に組み立てて、組み立て後にdataLayerを発火させる関数です。

こちらはリンク要素です。このリンクがクリックされた時に、前ページで見た関数に、 data-の値が渡されます。

select_promotionHTMLトリガー

HTMLソースとGTMのトリガー

select_promotionGTM タグ

(3) view_item_list

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/view_item_list.html

(3) view_item_listdataLayer

view_item_listGTM トリガー

トリガーのタイプは、「カスタム イベント」を使用しています。

view_item_listGTM タグ

(4) select_item

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/select_item.html

select_item – dataLayer

select_item – dataLayer

elect_item – HTMLソースとGTMのトリガー

elect_item – GTM タグ

(5) view_item

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/view_item.html

view_itemdataLayer

view_itemGTM トリガー

view_itemGTM タグ

(6)-(a) add_to_cart

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/add_to_cart.html

add_to_cartdataLayer

add_to_cartHTMLソースとGTMのトリガー

add_to_cartGTM タグ

(6)-(b) remove_from_cart

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/remove_from_cart.html

remove_from_cart – dataLayer

remove_from_cartHTMLソースとGTMのトリガー

remove_from_cartGTM タグ

(7) begin_checkout

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/begin_checkout.html

begin_checkout – dataLayer

begin_checkoutHTMLソースとGTMのトリガー

begin_checkoutGTM タグ

(8) purchase ※「purchase」は冒頭で取り上げましたが、購入の流れに従って、再び取り上げています。

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/purchase.html

purchase – dataLayer

purchaseGTM トリガー

トリガーのタイプは、「カスタム イベント」を使用しています。

purchaseGTM タグ

(9) refund

実際にアップしてあるテスト用ファイル:
https://ga4-quick.and-aaa.com/ec_test/refund.html

refunddataLayer

refundGTM トリガー

トリガーのタイプは、「カスタム イベント」を使用しています。

refundGTM タグ

関連記事

特集記事

コメント

  1. I’m nnot that much of a internet reade tto bee homest
    bbut your sotes rewlly nice, keep itt up! I’ll ggo ahead and boomark yohr
    websote to cpme back later. All tthe best

  2. Hi, just wanted to say, I enjoyed thiss post. It waas helpful.
    Keep on posting!

  3. It iss apropriate tiime too make ssome plans forr the future and itt is time tto be happy.
    I’ve read thiis post and iif I could I wabt too suggedst you some interessting things or advice.
    Perhaps youu can write next articles reerring to this article.
    I wish to read ven more things about it!

  4. Awesome things here. I’m very satisfcied to peer your
    article. Tanks a lott and I’m takingg a look ahead to tokuch you.
    Will youu kinly drop me a mail?

  5. Howdy! I could have swoorn I’ve vvisited your blog before butt after going
    through a few of the posfs I realized it’s neew too me.
    Anyhow, I’m definiteloy pleased I fohnd itt and I’ll bee bookmarking it andd
    checking back regularly!

  6. Looking forward to reading more. Great article.Really thank you! Great.

  7. Thanks-a-mundo for the blog.Really thank you! Want more.

  8. I truly appreciate this blog.Really thank you! Will read on…

  9. Im grateful for the post. Really Great.

  10. I am so grateful for your blog. Great.

  11. Thanks again for the article post.Thanks Again. Really Cool.

  12. Say, you got a nice article post.Really thank you! Fantastic.

  13. A big thank you for your post.Really thank you! Really Cool.

  14. A big thank you for your blog article.Really looking forward to read more. Keep writing.

  15. I truly appreciate this article post.Thanks Again.

  16. I appreciate you sharing this article.Thanks Again. Cool.

  17. Generally I do not learn post on blogs, but I would like to say that this write-up very compelled me to take a look at and do it! Your writing style has been amazed me. Thanks, quite nice post.

  18. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove me from that service? Many thanks!

  19. Thanks for the thoughts you are revealing on this blog site. Another thing I’d like to say is the fact that getting hold of duplicates of your credit profile in order to look at accuracy of each and every detail may be the first activity you have to execute in credit restoration. You are looking to clean up your credit history from detrimental details mistakes that spoil your credit score.

  20. Thanks for the recommendations shared in your blog. One more thing I would like to talk about is that weight-loss is not information on going on a fad diet and trying to shed as much weight as you’re able in a set period of time. The most effective way to lose weight naturally is by consuming it slowly but surely and following some basic suggestions which can allow you to make the most through your attempt to lose fat. You may recognize and be following most of these tips, however reinforcing information never does any damage.

  21. I have been exploring for a little for any high quality articles or blog posts on this kind of area . Exploring in Yahoo I finally stumbled upon this site. Reading this information So i am happy to show that I’ve a very just right uncanny feeling I discovered just what I needed. I most indubitably will make certain to do not forget this site and provides it a look on a continuing basis.

  22. I truly appreciate this article post.Really thank you! Great.

  23. I enjoy what you guys are up too. This kind of clever work and coverage! Keep up the terrific works guys I’ve incorporated you guys to my personal blogroll.

  24. I’d also like to say that most people who find themselves without the need of health insurance usually are students, self-employed and people who are without a job. More than half with the uninsured are under the age of Thirty-five. They do not really feel they are requiring health insurance because they are young along with healthy. Their income is frequently spent on houses, food, along with entertainment. Many people that do work either entire or in their free time are not offered insurance by means of their work so they head out without as a result of rising cost of health insurance in the states. Thanks for the tips you write about through this site.

  25. Thanks for your post. I have generally noticed that a majority of people are desperate to lose weight simply because they wish to show up slim as well as attractive. Nevertheless, they do not always realize that there are more benefits to losing weight in addition. Doctors say that fat people are afflicted with a variety of illnesses that can be directly attributed to their excess weight. Thankfully that people who’re overweight along with suffering from different diseases can help to eliminate the severity of their particular illnesses simply by losing weight. You possibly can see a slow but noticeable improvement with health when even a minor amount of losing weight is attained.

  26. Howdy this is kind of of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding skills so I wanted to get advice from someone with experience. Any help would be enormously appreciated!

  27. Good post made here. One thing I would like to say is most professional fields consider the Bachelor’s Degree like thejust like the entry level standard for an online certification. Though Associate Degrees are a great way to begin with, completing ones Bachelors reveals many entrances to various careers, there are numerous online Bachelor Diploma Programs available through institutions like The University of Phoenix, Intercontinental University Online and Kaplan. Another issue is that many brick and mortar institutions offer you Online editions of their certifications but typically for a significantly higher fee than the institutions that specialize in online college diploma plans.

  28. Thanks-a-mundo for the post.Much thanks again. Great.

  29. Appreciate you sharing, great post.Really looking forward to read more. Will read on…

  30. If youu desire to obtain a good deal from thgis paragraaph then yoou
    have too apply sich srrategies too your woon webpage.

  31. Have you ever thought about creating an e-book or guest authoring on other websites? I have a blog centered on the same topics you discuss and would love to have you share some stories/information. I know my subscribers would value your work. If you are even remotely interested, feel free to shoot me an email.

  32. This article is absolutely incredible! The author has done a phenomenal job of delivering the information in an compelling and informative manner. I can’t thank her enough for offering such valuable insights that have certainly enhanced my knowledge in this subject area. Hats off to him for producing such a gem!

  33. wow, awesome article post.Really thank you!

  34. Thanks for another informative site. Where else could I get that type of info written in such an ideal way? I’ve a project that I’m just now working on, and I have been on the look out for such information.

  35. Im obliged for the blog article.Really thank you! Great.

  36. Virtually all of whatever you articulate is supprisingly appropriate and it makes me wonder the reason why I hadn’t looked at this in this light previously. Your piece really did switch the light on for me as far as this specific topic goes. Nonetheless at this time there is actually just one factor I am not too cozy with and whilst I try to reconcile that with the main idea of your position, allow me observe exactly what the rest of your subscribers have to point out.Very well done.

  37. Almanya’nın en iyi medyumu haluk hoca sayesinde sizlerde güven içerisinde çalışmalar yaptırabilirsiniz, 40 yıllık uzmanlık ve tecrübesi ile sizlere en iyi medyumluk hizmeti sunuyoruz.

  38. Wow, great blog post.Thanks Again. Will read on…

  39. Good write-up, I?m regular visitor of one?s site, maintain up the excellent operate, and It is going to be a regular visitor for a lengthy time.

  40. http://www.thebudgetart.com is trusted worldwide canvas wall art prints & handmade canvas paintings online store. Thebudgetart.com offers budget price & high quality artwork, up-to 50 OFF, FREE Shipping USA, AUS, NZ & Worldwide Delivery.

  41. Hello there! I know this is kinda off topic but I was wondering which
    blog platform are you using for this website? I’m getting sick and tired of WordPress because I’ve had problems
    with hackers and I’m looking at alternatives for another platform.

    I would be fantastic if you could point me in the direction of a good platform.

  42. Aw, this was an exceptionally good post. Taking the time and actual effort to produce a good article…
    but what can I say… I put things off a lot and never
    seem to get nearly anything done.

  43. fantastic put up, very informative. I ponder why the opposite experts of this sector do not notice this.
    You must continue your writing. I am confident, you have a great readers’ base already!

  44. I am regular reader, how are you everybody?
    This article posted at this website is in fact fastidious.

  45. Looking forward to reading more. Great article.Really thank you! Keep writing.

  46. I really enjoy the blog. Cool.

  47. I appreciate you sharing this article post.Really looking forward to read more. Will read on…

  48. I really enjoy the blog.Much thanks again. Really Great.

    • pia proxy
    • 2024.04.21 1:49am

    Great blog.Thanks Again. Really Great.

  49. Enjoyed every bit of your blog post.Really thank you! Really Great.

  50. I think this is a real great blog post. Really Great.

  51. Fantastic blog.Really looking forward to read more. Fantastic.

  52. Appreciate you sharing, great blog article.Much thanks again. Keep writing.

  53. I really like and appreciate your article post. Really Great.

  54. Major thanks for the article. Great.

  55. Great blog article.Really looking forward to read more.

  56. This is one awesome blog post.Really thank you! Keep writing.

  57. Major thankies for the blog.Really looking forward to read more. Keep writing.

  58. Really informative blog.Really looking forward to read more. Fantastic.

  59. Very neat post. Much obliged.

  60. Very neat post.Really looking forward to read more. Want more.

ランキング(週間)

  1. 1

    GA4 「ページ ロケーション」と「ページ パス と スクリーン クラス」何が違う?ドメインの有無以外にもパラメータの扱いに違いあり

  2. 2

    GA4の探索で「ページ別訪問数」を見ることは可能か?

  3. 3

    GA4 拡張計測機能の新顔「フォームの操作」 form_start, form_submit

  4. 4

    GA4のレポート画面の数値データは、イベント発生時から何時間後に確定するのか?

  5. 5

    GA4の指標「総ユーザー数」VS「アクティブ ユーザー数」

  6. 6

    【祝・GPT-4 が ChatGPT plus に登場記念!】アクセス解析コンサルタントが、GPT-4にCSVデータを渡して、データ解析結果のコメントを書いてもらう方法

  7. 7

    GA4で異なるドメイン(サブドメイン)の同一ページパスをドメイン付きで表示する

  8. 8

    YouTubeの概要欄に貼られたリンクをクリックしてサイトを訪れたユーザーを計測するために

  9. 9

    GA4 クロスドメイン設定では、リンク先に「_gl」パラメータが付く。勝手なパラメータを付けるとエラーになるページは要注意

  10. 10

    GA4 イベントタグの「詳細設定」に「e コマースデータを送信」が実装されました。

最近の記事

  1. 生成AIを調整してABテストを実装したら想像以上に早かった

  2. 無料で使えるABテストツールのバージョンアップを行いました

  3. 無料ABテストツール(and,B)のマニュアルを作成しました

カテゴリー

 
TOP