HelpCenter
ページグループ、コンバージョン、イベントなどを設定する際に、Ptengineでは下記5つのマッチングルールを利用します。「含む」「前方一致」「後方一致」「完全一致」「正規表現」です。
特定文字列を含むURL。例えば、「abc.com」指定で「含む」ルールを選択すると、「abc.com.contact」など入力したURLが含まれた場合に対象とします。
abc.com
abc.com.contact
前方一致は文字列の最初の文字から指定した最後の文字まで一致する場合に対象とします。
ウェブサイトのURLに通常あまり変化がないが、URLの末尾に様々なパラメータが含まれている場合は、この前方一致モードが適しています。
たとえば、特定の訪問者が訪問したサイトがhttps://www.example.com/checkout.cgi?page=1&id=9982251615 だとすれば、前方一致でそのまま登録するとその他のユーザーの登録番号は含まれません。「http://www.example.com/checkout.cgi?page」と設定した場合は、page=1以外の他のページ内容も含めてかつ全ての登録番号を集計します。「http://www.example.com/checkout.cgi?page=1」を設定した場合は該当ページに制限した上で、全ての登録番号のユーザーの集計が可能になります。
https://www.example.com/checkout.cgi?page=1&id=9982251615
http://www.example.com/checkout.cgi?page
http://www.example.com/checkout.cgi?page=1
後方一致は文字列の最後の文字から指定した最初の文字まで一致する場合を対象とします。
たとえば、URLがhttp://www.example.com/s/test/index.html だとすると、後方一致モードで一致させるURLは「/test/index.html」に設定します。
http://www.example.com/s/test/index.html
この場合、サイトの前の部分が異なっており、「http://www.123.com/s/test/index.html」 となっても一致します。
http://www.123.com/s/test/index.html
また、http://www.example.com/s/test/index.html?wore=xxx となると、後方に「?wore=xxx」があるため、後方一致では一致させることはできません。
http://www.example.com/s/test/index.html?wore=xxx
完全一致は最初から最後までURLの全ての文字が完全に一致し、例外がないことを指します。 このモードを使用する場合、URLクエリパラメーターなど動的(場合に応じて変化する)情報を含めることはできません。
Ptengineは正規表現に対応しており、詳細なトラッキング設定を行うことができます。正規表現とはいくつかの文字列を一つの形式で表現するための表現方法です。
実正規表現は大量のデータから正規表現のパターンに一致する文字列を検索するときなどに使われます。 検索するための条件を指定するには特殊な記号を用いります。これは特殊文字やメタ文字と言われるもので、主にワイルドカード、アンカー、グループ化という種別に区分けできます。 それぞれ下記にて説明します。
ワイルドカード
アンカー
グループ化
その他
注意点:正規表現は簡単であればあるほど、作成者を含めたチームメンバーに使いやすいです。
正規表現: ^https:\/\/www.ptmind.com($|\/$|\/\?.*)
^https:\/\/www.ptmind.com($|\/$|\/\?.*)
含まれるURL: https://www.ptmind.com https://www.ptmind.com/ https://www.ptmind.com/?WT.mc_id=xxxx
https://www.ptmind.com
https://www.ptmind.com/
https://www.ptmind.com/?WT.mc_id=xxxx
含まれないURL: https://www.ptmind.com/abc
https://www.ptmind.com/abc
正規表現: ^(http|https):\/\/(sh|bj|tj).ptmind.com
^(http|https):\/\/(sh|bj|tj).ptmind.com
含まれるURL: http://sh.ptmind.com http://bj.ptmind.com/abc http://tj.ptmind.com https://sh.ptmind.com https://bj.ptmind.com/?WT.mc_id=xxxx https://tj.ptmind.com
http://sh.ptmind.com
http://bj.ptmind.com/abc
http://tj.ptmind.com
https://sh.ptmind.com
https://bj.ptmind.com/?WT.mc_id=xxxx
https://tj.ptmind.com
含まれないURL: https://www.ptmind.com
正規表現: ^http:\/\/ptmind\.com\/price.*$
^http:\/\/ptmind\.com\/price.*$
含まれるURL: http://ptmind.com/price/page http://ptmind.com/price?sid=23fwe3r2&vid=345666 http://ptmind.com/price#top http://ptmind.com/price
http://ptmind.com/price/page
http://ptmind.com/price?sid=23fwe3r2&vid=345666
http://ptmind.com/price#top
http://ptmind.com/price
含まれないURL: ー
正規表現: ^(http|https):\/\/[a-z0-9]*[.]*ptmind.com\/service\/mng_units\/lp03$
^(http|https):\/\/[a-z0-9]*[.]*ptmind.com\/service\/mng_units\/lp03$
含まれるURL: http://www.ptmind.com/service/mng_units/lp03 https://www.ptmind.com/service/mng_units/lp03 http://ptmind.com/service/mng_units/lp03 http://a123.ptmind.com/service/mng_units/lp03 https://ptmind.com/service/mng_units/lp03
http://www.ptmind.com/service/mng_units/lp03
https://www.ptmind.com/service/mng_units/lp03
http://ptmind.com/service/mng_units/lp03
http://a123.ptmind.com/service/mng_units/lp03
https://ptmind.com/service/mng_units/lp03
含まれないURL:ー
正規表現: ^http:\/\/ptmind.com\/detail\/id=6984([6][1-9][0-9]|[6][0][4-9]|[7][0-7][0-9]|[7][8][0-3])$
^http:\/\/ptmind.com\/detail\/id=6984([6][1-9][0-9]|[6][0][4-9]|[7][0-7][0-9]|[7][8][0-3])$
含まれるURL: http://ptmind.com/detail/id=6984604 http://ptmind.com/detail/id=6984783
http://ptmind.com/detail/id=6984604
http://ptmind.com/detail/id=6984783
含まれないURL: http://ptmind.com/detail/id=6984784 http://ptmind.com/detail/id=6984603
http://ptmind.com/detail/id=6984784
http://ptmind.com/detail/id=6984603
正規表現の記述が正しいかどうかの確認は、こちらのようなツールで可能です。 https://www.regexpal.com/
https://www.regexpal.com/
※設定中に何かご不明ががございましたら、製品内チャットでお気軽にご連絡ください!
この記事についてどう思いますか?
評価いただきありがとうございました
申しわけありません!理由を教えてください。
サポートチームに直接問合せたい場合、こちらをクリックしてチャットしましょう。
フィードバックいただき、ありがとうございました。
フィードバックはちゃんと届きました。ご意見を元に、より良いコンテンツをお届けしてまいります。アップデートした後また連絡します。