Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit ed68111

Browse files
committed
PPI-1027 api for configuring deep links
1 parent ce498de commit ed68111

File tree

1 file changed

+50
-1
lines changed
  • data_collection/web/javascript_tracking_client

1 file changed

+50
-1
lines changed

data_collection/web/javascript_tracking_client/api.rst

+50-1
Original file line numberDiff line numberDiff line change
@@ -2973,7 +2973,7 @@ JavaScript Tracking Client configuration
29732973

29742974
Returns list of internal domains (set with :func:`setDomains` and used in :ref:`outlink tracking<jtc-api-download-and-outlink>`).
29752975

2976-
:return: List of internal domains (e.g. ``[".example.com", ".example.co.uk"]``
2976+
:return: List of internal domains (e.g. ``[".example.com", ".example.co.uk"]``)
29772977
:rtype: string[]
29782978

29792979
Example of usage:
@@ -2994,6 +2994,55 @@ JavaScript Tracking Client configuration
29942994
29952995
console.log(jstc.getDomains());
29962996
2997+
.. function:: setDeepLinkPrefixes(prefixes)
2998+
2999+
Allows to define a list of mobile app prefixes (URIs). Used in :ref:`outlink tracking<jtc-api-download-and-outlink>`
3000+
for determining whether a link is an outlink and in :ref:`cross domain linking<jtc-api-cross-domain-linking>`
3001+
for determining which links should have visitor ID parameter injected.
3002+
3003+
:param Array<string> prefixes: **Required** A list of app prefixes.
3004+
3005+
Example of usage:
3006+
3007+
.. tabs::
3008+
3009+
.. group-tab:: Command queue
3010+
3011+
.. code-block:: javascript
3012+
3013+
_paq.push(["setDeepLinkPrefixes", ["piwik://", "myApp://"]]);
3014+
3015+
.. group-tab:: JavaScript Tracking Client object
3016+
3017+
.. code-block:: javascript
3018+
3019+
jstc.setDeepLinkPrefixes(["piwik://", "myApp://"]);
3020+
3021+
.. function:: getDeepLinkPrefixes()
3022+
3023+
Returns list of prefixes (URIs) (set with :func:`setDeepLinkPrefixes` and used in :ref:`outlink tracking<jtc-api-download-and-outlink>`).
3024+
3025+
:return: List of prefixes (e.g. ``["piwik://", "myApp://"]``)
3026+
:rtype: string[]
3027+
3028+
Example of usage:
3029+
3030+
.. tabs::
3031+
3032+
.. group-tab:: Command queue
3033+
3034+
.. code-block:: javascript
3035+
3036+
_paq.push([function () {
3037+
console.log(this.getDeepLinkPrefixes());
3038+
}]);
3039+
3040+
.. group-tab:: JavaScript Tracking Client object
3041+
3042+
.. code-block:: javascript
3043+
3044+
console.log(jstc.getDeepLinkPrefixes());
3045+
29973046
.. function:: setCustomUrl(customUrl)
29983047

29993048
The function that will override tracked page URL. Tracker will use current page URL if custom URL was not set.

0 commit comments

Comments
 (0)