OneLinkUrlGenerator v1
概要
OneLinkUrlGenerator は、ブランドのWebサイト上のボタンやバナー向けのリンクを自動的に生成し埋め込みます。
パブリックコンストラクタ
OneLinkUrlGenerator
引数の入力
タイプ | パラメーター | 詳細 |
---|---|---|
文字列 | oneLinkURL (必須) | - スクリプトで生成されるすべてのリンクのベースとなります。 - これは OneLinkテンプレートドメイン+テンプレートIDです。 |
文字列の一覧 | pidKeysList | - pid パラメーターとして送信URLに配置されるメディアソースパラメーターを受信URLにリストアップします。 - 複数のメディアソースパラメーターが受信リンク上にある場合(例:af_pid と utm_source)、pidKeysList は最初から最後までパラメーターをスキャンし、最初にマッチしたものを使用します。 |
dictionary {string: string, …} | pidOverrideList | 入力されたURLに含まれるメディアソースの値と、それらをどのように置換するかを一覧表示します。 |
文字列 | pidStaticValue | pidKeysList にpidが見つからない場合、pidStaticValue がpidとして使用されます。 |
文字列の一覧 | campaignKeysList | 送信側URLの c パラメーターとして配置される受信側URLのキャンペーンパラメーターの一覧。 |
文字列 | campaignStaticValue | campaignKeysList にキャンペーンキーが見つからない場合は、c値として campaignStaticValue が使用されます。 |
文字列 | gclIdParam | - 送信URLでどのパラメーターがGCLIDを持っているかを定義します。 - 任意のパラメーターを選択できます。注記!AppsFlyerのローデータに表示するためには、パラメーターは、af_sub[1-5] のいずれかを使用する必要があります。 |
文字列 | skipList | If any strings in the skip list appear in the HTTP referrer, the Smart Script does not run and returns null . |
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
pidStaticValue: 'my_static_pid',
campaignKeysList: ['incoming_campaign'],
campaignStaticValue: 'my_static_cmpn',
});
パブリックメソッド
generateUrl
概要
この関数は、前述のパブリックコンストラクタと以下で説明するセッター関数をもとにURLを生成します。
引数の入力
None
戻り値
タイプ | 詳細 |
---|---|
文字列 | 次によって生成されたURL: OneLinkUrlGenerator |
使用例:
const url = onelinkGenerator.generateUrl();
setDeepLinkValue
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | deepLinkValueParam | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL deep_link_value . | True |
文字列 | deepLinkValue | A fallback value to be set in the outgoing URL deep_link_value if deepLinkValueParam is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setDeepLinkValue("original_url_deeplinkvalue", "yessss");
const url = onelinkGenerator.generateUrl();
setChannel
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | channelParam | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_channel . | True |
文字列 | channelValue | A fallback value to be set in the outgoing URL af_channel if channelParam is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setChannel("original_url_channel", "new_channel");
const url = onelinkGenerator.generateUrl();
setAdset
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | adsetParam | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_adset . | True |
文字列 | adsetValue | A fallback value to be set in the outgoing URL af_adset if adsetParam is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAdset("no_adset", "adset");
const url = onelinkGenerator.generateUrl();
setAd
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | adParam | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_ad . | True |
文字列 | adValue | A fallback value to be set in the outgoing URL af_ad if adParam is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAd("original_url_ad", "new_ad");
const url = onelinkGenerator.generateUrl();
setAfSub1
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | afSub1Param | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_sub1 . | True |
文字列 | afSub1Value | A fallback value to be set in the outgoing URL af_sub1 if afSub1Param is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAfSub1("original_url_sub1", "ram_afsub1");
const url = onelinkGenerator.generateUrl();
setAfSub2
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | afSub2Param | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_sub2 . | True |
文字列 | afSub2Value | A fallback value to be set in the outgoing URL af_sub2 if afSub2Param is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAfSub2("original_url_sub2","fallback_sub2");
const url = onelinkGenerator.generateUrl();
setAfSub3
引数の入力
タイプ | パラメーター | 詳細 | 必須 |
---|---|---|---|
文字列 | afSub3Param | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_sub3 . | True |
文字列 | afSub3Value | A fallback value to be set in the outgoing URL af_sub3 if afSub3Param is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAfSub3("original_sub3", "new_afsub3");
const url = onelinkGenerator.generateUrl();
setAfSub4
引数の入力
タイプ | パラメーター | 説明 | 必須 |
---|---|---|---|
文字列 | afSub4Param | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_sub4 . | True |
文字列 | afSub4Value | A fallback value to be set in the outgoing URL af_sub4 if afSub4Param is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAfSub3("orignial_sub4", "fallback_afsub4");
const url = onelinkGenerator.generateUrl();
setAfSub5
引数の入力
タイプ | パラメーター | 説明 | 必須 |
---|---|---|---|
文字列 | afSub5Param | The key in the incoming URL from which the script takes the deep link value to set in the outgoing URL af_sub5 . | True |
文字列 | afSub5Value | A fallback value to be set in the outgoing URL af_sub5 if afSub5Param is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setAfSub5("neverfind_sub5", "new_afsub5");
const url = onelinkGenerator.generateUrl();
setCustomParameter
引数の入力
タイプ | パラメーター | 説明 | 必須 |
---|---|---|---|
文字列 | searchKey | 次のスクリプトが送信URLに設定する値の元となる受信URL内のキー: customKey | True |
文字列 | customKey | 次の検索キーによって見つかった値を配置する送信OneLink URLのキー: searchKey | True |
文字列 | customValue | A fallback value to be set in the outgoing URL customKey if searchKey is not found in the incoming URL. | False |
戻り値
void
使用例:
const onelinkGenerator = new window.AF.OneLinkUrlGenerator(
{oneLinkURL: "https://engmntqa.onelink.me/LtRd/",
pidKeysList: ['incoming_media_source'],
campaignKeysList: ['incoming_campaign']
});
onelinkGenerator.setCustomParameter("search_key_on_url", "onelink_custom_param", "fallback_value");
const url = onelinkGenerator.generateUrl();
更新済 約1年前