広告主向けのAdobe Experience Platform統合
このページでは、Adobe Experience Platformを使用してRokt Adsを実装し、コンバージョンをキャンペーンにリンクさせてループを閉じる方法を説明します。コンバージョンをAdsのエンゲージメントにリンクさせることで、より正確なアトリビューション、リアルタイムの最適化、およびキャンペーンの測定が可能になります。
Adobeのデータレイヤーに基づいてデータ要素を作成する方法、およびRokt SDKを初期化しコンバージョンをログするルールを作成する方法を学びます。
ルールを作成する
Rokt SDKを初期化する
- Adobe Experience Platformにサインインします。
- プロパティの概要ページから、Rulesタブを開き、Add Ruleを選択します。
- ルールに説明的な名前を付けます(例: Rokt Initialization)し、ルール を発火させるイベントを作成します。
- サイトごとに異なりますが、RoktはSDKスクリプトをすべてのページに含めることを推奨しています。これにより、最低のオファー配信レイテンシーと最高のユーザー識別精度が確保されます。
- サイトごとに異なりますが、RoktはSDKスクリプトをすべてのページに含めることを推奨しています。これにより、最低のオファー配信レイテンシーと最高のユーザー識別精度が確保されます。
- アクションを作成し、Coreを拡張機能、Custom Codeをアクションタイプとして選択します。
- HTMLを言語として選択し、次のスニペットを貼り付けます:
<script>
// Rokt APIキーを入力してください
const API_KEY = "YOUR_API_KEY";
// ファーストパーティドメインを設定した場合は、デフォルトのapps.rokt-apiドメインの代わりにその値をDOMAINとして設定します
const ROKT_DOMAIN = "https://apps.rokt-api.com";
// SDK設定を設定します
window.mParticle = {
config: {
// データ環境をisDevelopmentModeで指定します:
// 統合をまだテスト中の場合は、isDevelopmentModeをtrueに設定します。
// 統合が本番データの準備ができている場合は、isDevelopmentModeをfalseに設定します。
isDevelopmentMode: true,
// 現在のユーザーを識別します:
// ユーザーのメールアドレスを持っている場合、以下に示すように`identifyRequest`内の`userIdentities`というオブジェクトにそれを含めてください。
identifyRequest: {
userIdentities: {
// サンプル変数{email}をユーザーのメールを保存するために作成した変数に置き換えてください
email: _satellite.getVar('email'),
// ハッシュ化されたメールアドレスは`other`フィールドに入力する必要があります
その他: _satellite.getVar('hashed_email')
},
}
},
};
// SDKの読み込み
(function(e) { window.mParticle = window.mParticle || {}; window.mParticle.EventType = { Unknown: 0, Navigation: 1, Location: 2, Search: 3, Transaction: 4, UserContent: 5, UserPreference: 6, Social: 7, Other: 8, Media: 9 }; window.mParticle.eCommerce = { Cart: {} }; window.mParticle.Identity = {}; window.mParticle.Rokt = {}; window.mParticle.config = window.mParticle.config || {}; window.mParticle.config.rq = []; window.mParticle.config.snippetVersion = 2.7; window.mParticle.ready = function(e) { window.mParticle.config.rq.push(e); }; ["endSession", "logError", "logBaseEvent", "logEvent", "logForm", "logLink", "logPageView", "setSessionAttribute", "setAppName", "setAppVersion", "setOptOut", "setPosition", "startNewSession", "startTrackingLocation", "stopTrackingLocation"].forEach(function(e) { window.mParticle[e] = function() { var t = Array.prototype.slice.call(arguments); t.unshift(e); window.mParticle.config.rq.push(t); }; }); ["setCurrencyCode", "logCheckout"].forEach(function(e) { window.mParticle.eCommerce[e] = function() { var t = Array.prototype.slice.call(arguments); t.unshift("eCommerce." + e); window.mParticle.config.rq.push(t); }; }); ["identify", "login", "logout", "modify"].forEach(function(e) { window.mParticle.Identity[e] = function() { var t = Array.prototype.slice.call(arguments); t.unshift("Identity." + e); window.mParticle.config.rq.push(t); }; }); ["selectPlacements","hashAttributes","setExtensionData","use","getVersion","terminate"].forEach(function(e) { window.mParticle.Rokt[e] = function() { var t = Array.prototype.slice.call(arguments); t.unshift("Rokt." + e); window.mParticle.config.rq.push(t); }; }); var t = window.mParticle.config.isDevelopmentMode ? 1 : 0, n = "?env=" + t, a = window.mParticle.config.dataPlan; if (a) { var o = a.planId, r = a.planVersion; o && (r && (r < 1 || r > 1e3) && (r = null), n += "&plan_id=" + o + (r ? "&plan_version=" + r : "")); } var i = window.mParticle.config.versions, s = []; i && Object.keys(i).forEach(function(e) { s.push(e + "=" + i[e]); }); var c = document.createElement("script"); c.type = "text/javascript"; c.async = !0; window.ROKT_DOMAIN = ROKT_DOMAIN || 'https://apps.rokt-api.com'; mParticle.config.domain = ROKT_DOMAIN.split('//')[1]; c.src = ROKT_DOMAIN + "/js/v2/" + e + "/app.js" + n + "&" + s.join("&"); var l = document.getElementsByTagName("script")[0]; l.parentNode.insertBefore(c, l); })(API_KEY);
</script>
- 設定の入力:
YOUR_API_KEY
をRoktアカウントマネージャーから提供されたAPIキーで置き換えます。- カスタムドメインをファーストパーティードメインの統合に設定している場合は、
https://apps.rokt-api.com
を新しいドメインで置き換えます。 - タグを本番データで使用する準備が整ったら、
isDevelopmentMode
をfalse
に設定します。タグのテストをまだ行っている場合は、true
のままにします。 email
が、ユーザーのハッシュされていないメールアドレスを保存するために作成したデータ要素に設定されていることを確認します。上記のスニペットでは、_satellite.getVar('email')
を使用してデータ要素にアクセスできます。
- アクション構成で Keep Changes をクリックし、Save をクリックします。