Other Cross-Domain Configuration Methods

Other Cross-Domain Configuration Methods

Cross-domain configuration is basically automatic, but if measurement is not working properly, please try the following methods.

Full Manual Configuration

Add the following to the Ptengine base tag:

This is the procedure for embedding a special tag for cross-domain measurement in your site's source code.

Add lines 2-6 below to the Ptengine base tag ▼ Tag copy-paste

<!-- Ptengine Tag -->
<script>
window._pt_sp_2 = [];
_pt_sp_2.push('setCrossDomainLink,allManual');
_pt_sp_2.push('setAccount,xxxxxxxx');
</script>
<script src="<https://js.ptengine.jp/xxxxxxxx.js>"></script>
<!-- End Ptengine Tag -->
Replace xxxxxxxx with your tag (sid).

Semi-Manual Configuration

Use this method if your page has many anchor tags where cross-domain occurs, and you want to measure transitions only from specific anchor tags rather than all of them.

Similar to the configuration method in Method 2, add lines 12-16 below to the Ptengine base tag ▼ Tag copy-paste

2 Add "data-pt-crossDomain" to the anchor tag (button) that transitions from page a to page b, as follows. ▼ Tag copy-paste

API Integration

If the transition button is not an anchor tag but another tag, such as a form tag, none of the above methods can be applied. API integration is required. Please refer to the configuration method below. We recommend entrusting this to engineers if you are not familiar with coding.

Set the following Ptengine external API with JavaScript in the button's click event to complete the configuration.

For example, if you want to navigate to a different site when a button is clicked, you can configure it using Ptengine's external API as follows.

✅ How to Confirm Configuration Completion

Confirm that #_pt_link=******** or ?_pt_link=******** is appended to the URL after the cross-domain transition.

Example: https://www.b.com#_pt_link=_s_gEjf3wNa5RNxgw4lC5H8Eg...

DANGER

Important Points

Automatic configuration is effective even if you are not using Experience

When turned ON, it applies to both Insight and Experience (the original Insight configuration is disabled)

If not turned ON, it will not be applied in Experience

最終更新