広告をクリックしたユーザーが、何らかの「成果」となる行動をとった数です。これを計測することで、広告がどの程度成果を上げているかなどを確認できます。
詳しくは以下のヘルプをご参照ください。
・コンバージョン測定とは
検索広告APIでは、コンバージョントラッカー情報(コンバージョン測定タグおよび、タグごとのパフォーマンスデータ)の取得および追加・更新を行うために、ConversionTrackerService、を使用します。
本サービスを利用することで、検索広告で掲載されている広告からのコンバージョン数(商品の購入や会員登録、資料請求などサイト上で何らかの成約に至った件数)を取得することができ、広告がどの程度成果を上げているかなどを確認できます。
コンバージョンタグは広告管理ツールとAPIで共有しています。
A社は商品B(1万円)を販売しているが、ウェブページでコンバージョンを計測するための、コンバージョントラッカーを作成する。
| 項目 | 値 | 項目の説明 |
|---|---|---|
| category | PURCHASE(購入/販売) | コンバージョントラッカー情報のカテゴリ |
| conversionTrackerName | (分かりやすい名称を) | コンバージョントラッカーの名称 |
| conversionTrackerType | WEB_CONVERSION | コンバージョンの種別 |
| measurementPeriod | 30 | コンバージョン計測期間(●日) |
| status | ENABLED(ウェブページへのアクセスを記録する) | コンバージョントラッカー情報のステータス |
| userRevenueValue | 10000 | 売上金額が固定のときの、1コンバージョンの売上(●円)※商品Bの値段 |
| markupLanguage(webConversion) | HTML | スニペットの記述に使用するマークアップ言語 |
| trackingCodeType(webConversion) | WEBPAGE | ウェブページのトラッキングタイプ |
はじめに、ConversionTrackerService:addを使い、コンバージョントラッカー情報を追加します。
{
"accountId": 111111,
"operand": [
{
"category": "PURCHASE",
"conversionTrackerName": "Pro_B_CV",
"conversionTrackerType": "WEB_CONVERSION",
"measurementPeriod": 30,
"status": "ENABLED",
"userRevenueValue": "10000",
"webConversion": {
"markupLanguage": "HTML",
"trackingCodeType": "WEBPAGE"
}
}
]
}
※snippet(webConversion)と、advancedSnippet(webConversion)のレスポンスは、ConversionTrackerService:getで確認してください。
{
"errors": null,
"rid": "f7eaf398417b6eea34b1274ce683469d",
"rval": {
"values": [
{
"conversionTracker": {
"accountId": 111111,
"allConversionValue": null,
"allConversions": null,
"appConversion": null,
"category": "PURCHASE",
"conversionCountingType": "MANY_PER_CLICK",
"conversionTrackerId": 222222,
"conversionTrackerName": "Pro_B_CV",
"conversionTrackerType": "WEB_CONVERSION",
"conversionValue": null,
"conversions": null,
"excludeFromBidding": "FALSE",
"measurementPeriod": 30,
"mostRecentConversionDate": null,
"status": "ENABLED",
"userRevenueValue": "10000",
"webConversion": {
"markupLanguage": "HTML",
"snippet": null,
"advancedSnippet": null,
"trackingCodeType": "WEBPAGE"
}
},
"errors": null,
"operationSucceeded": true
}
]
}
}
次に、ConversionTrackerService:getを使い、先ほど登録したコンバージョン計測タグを取得します。
※コンバージョン測定タグの、snippet(webConversion)※従来版、advancedSnippet(webConversion)※リニューアル版、は、ここで確認してください。
※advancedSnippetを使用する場合、サイトジェネラルタグも必要です。詳しくは以下のヘルプをご参照ください。
・サイトジェネラルタグについて
{
"accountId": 111111,
"conversionTrackerIds": [
222222
],
"numberResults": 1,
"startIndex": 1,
"statuses": [
"ENABLED"
],
"trackingCodeTypes": [
"WEBPAGE"
]
}
{
"errors": null,
"rid": "180b348e3630b1feef3a9ef24546e488",
"rval": {
"totalAllConversionValue": "0",
"totalAllConversions": 0,
"totalConversionValue": "0",
"totalConversions": 0,
"totalNumEntries": 1,
"values": [
{
"conversionTracker": {
"accountId": 111111,
"allConversionValue": null,
"allConversions": null,
"appConversion": null,
"category": "PURCHASE",
"conversionCountingType": "MANY_PER_CLICK",
"conversionTrackerId": 222222,
"conversionTrackerName": "Pro_B_CV",
"conversionTrackerType": "WEB_CONVERSION",
"conversionValue": null,
"conversions": null,
"excludeFromBidding": "FALSE",
"measurementPeriod": 30,
"mostRecentConversionDate": null,
"status": "ENABLED",
"userRevenueValue": "10000",
"webConversion": {
"markupLanguage": "HTML",
"snippet": "<!-- Yahoo Code for your Conversion Page -->\n<script type=\"text/javascript\">\n /* <![CDATA[ */\n var yahoo_conversion_id = 1000000407;\n var yahoo_conversion_label = \"S7vjCPKvk9oBEJ7fgOQD\";\n var yahoo_conversion_value = 10000;\n /* ]]> */\n</script>\n<script type=\"text/javascript\" src=\"https://s.yimg.jp/images/listing/tool/cv/conversion.js\">\n</script>\n<noscript>\n <div style=\"display:inline;\">\n <img height=\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\" src=\"https://b91.yahoo.co.jp/pagead/conversion/1000000407/?value=10000&label=S7vjCPKvk9oBEJ7fgOQD&guid=ON&script=0&disvt=true\"/>\n </div>\n</noscript>",
"advancedSnippet": "<script async>\nytag({\n \"type\": \"yss_conversion\",\n \"config\": {\n \"yahoo_conversion_id\": \"1000000407\",\n \"yahoo_conversion_label\": \"S7vjCPKvk9oBEJ7fgOQD\",\n \"yahoo_conversion_value\": \"10000\"\n }\n});\n</script>",
"trackingCodeType": "WEBPAGE"
}
},
"errors": null,
"operationSucceeded": true
}
]
}
}
上記の、ConversionTrackerService:get、で取得した、snippet(webConversion)、advancedSnippet(webConversion)を、ウェブサイトに埋め込んで、計測を開始します。
再び、ConversionTrackerService:getを使い、コンバージョンの計測結果を取得します。
{
"accountId": 111111,
"conversionTrackerIds": [
222222
],
"numberResults": 1,
"startIndex": 1,
"statuses": [
"ENABLED"
],
"trackingCodeTypes": [
"WEBPAGE"
]
}
{
"errors": null,
"rid": "180b348e3630b1feef3a9ef24546e488",
"rval": {
"totalAllConversionValue": "10000000",
"totalAllConversions": 1000,
"totalConversionValue": "100000000",
"totalConversions": 10000,
"totalNumEntries": 1,
"values": [
{
"conversionTracker": {
"accountId": 111111,
"allConversionValue": 10000000,
"allConversions": 1000,
"appConversion": null,
"category": "PURCHASE",
"conversionCountingType": "MANY_PER_CLICK",
"conversionTrackerId": 222222,
"conversionTrackerName": "Pro_B_CV",
"conversionTrackerType": "WEB_CONVERSION",
"conversionValue": 100000000,
"conversions": 10000,
"excludeFromBidding": "FALSE",
"measurementPeriod": 30,
"mostRecentConversionDate": null,
"status": "ENABLED",
"userRevenueValue": "10000",
"webConversion": {
"markupLanguage": "HTML",
"snippet": "<!-- Yahoo Code for your Conversion Page -->\n<script type=\"text/javascript\">\n /* <![CDATA[ */\n var yahoo_conversion_id = 1000000407;\n var yahoo_conversion_label = \"S7vjCPKvk9oBEJ7fgOQD\";\n var yahoo_conversion_value = 10000;\n /* ]]> */\n</script>\n<script type=\"text/javascript\" src=\"https://s.yimg.jp/images/listing/tool/cv/conversion.js\">\n</script>\n<noscript>\n <div style=\"display:inline;\">\n <img height=\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\" src=\"https://b91.yahoo.co.jp/pagead/conversion/1000000407/?value=10000&label=S7vjCPKvk9oBEJ7fgOQD&guid=ON&script=0&disvt=true\"/>\n </div>\n</noscript>",
"advancedSnippet": "<script async>\nytag({\n \"type\": \"yss_conversion\",\n \"config\": {\n \"yahoo_conversion_id\": \"1000000407\",\n \"yahoo_conversion_label\": \"S7vjCPKvk9oBEJ7fgOQD\",\n \"yahoo_conversion_value\": \"10000\"\n }\n});\n</script>",
"trackingCodeType": "WEBPAGE"
}
},
"errors": null,
"operationSucceeded": true
}
]
}
}
そして、ConversionTrackerService:setを使い、先ほど登録したコンバージョントラッカー情報を更新します。
以下では、コンバージョントラッカー情報のカテゴリを、PURCHASE(販売)からPAGE_VIEW(主要なページの閲覧)に更新しています。
{
"accountId": 111111,
"operand": [
{
"category": "PAGE_VIEW",
"conversionTrackerId": 222222,
"conversionTrackerType": "WEB_CONVERSION"
}
]
}
{
"errors": null,
"rid": "5b5d34b5cd8238352127e418b2b4bacb",
"rval": {
"values": [
{
"conversionTracker": {
"accountId": 111111,
"allConversionValue": 10000000,
"allConversions": 1000,
"appConversion": null,
"category": "PAGE_VIEW",
"conversionCountingType": "MANY_PER_CLICK",
"conversionTrackerId": 222222,
"conversionTrackerName": "Pro_B_CV",
"conversionTrackerType": "WEB_CONVERSION",
"conversionValue": 100000000,
"conversions": 10000,
"excludeFromBidding": "FALSE",
"measurementPeriod": 30,
"mostRecentConversionDate": null,
"status": "ENABLED",
"userRevenueValue": "10000",
"webConversion": {
"markupLanguage": "HTML",
"snippet": "<!-- Yahoo Code for your Conversion Page -->\n<script type=\"text/javascript\">\n /* <![CDATA[ */\n var yahoo_conversion_id = 1000000407;\n var yahoo_conversion_label = \"S7vjCPKvk9oBEJ7fgOQD\";\n var yahoo_conversion_value = 10000;\n /* ]]> */\n</script>\n<script type=\"text/javascript\" src=\"https://s.yimg.jp/images/listing/tool/cv/conversion.js\">\n</script>\n<noscript>\n <div style=\"display:inline;\">\n <img height=\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\" src=\"https://b91.yahoo.co.jp/pagead/conversion/1000000407/?value=10000&label=S7vjCPKvk9oBEJ7fgOQD&guid=ON&script=0&disvt=true\"/>\n </div>\n</noscript>",
"advancedSnippet": "<script async>\nytag({\n \"type\": \"yss_conversion\",\n \"config\": {\n \"yahoo_conversion_id\": \"1000000407\",\n \"yahoo_conversion_label\": \"S7vjCPKvk9oBEJ7fgOQD\",\n \"yahoo_conversion_value\": \"10000\"\n }\n});\n</script>",
"trackingCodeType": "WEBPAGE"
}
},
"errors": null,
"operationSucceeded": true
}
]
}
}