Skip to content

Commit

Permalink
IBX-9107 Added link to the min.js ibexa tracker file. (#2522)
Browse files Browse the repository at this point in the history
* IBX-9107 Added link to the min.js ibexa tracker file.

* IBX-9107 Added link to the min.js ibexa tracker file.

* IBX-9107 Added link to the min.js ibexa tracker file.

* IBX-9107 Added more details about user

* IBX-9107 Fixed spaces.

* IBX-9107 Updated not defined user details.

* IBX-9107 Changed after PR comments.

* Update docs/personalization/tracking_with_ibexa-tracker.md

Co-authored-by: Justyna Koralewicz <79849375+juskora@users.noreply.github.com>

* IBX-9107 Changed url in example

---------

Co-authored-by: Justyna Koralewicz <79849375+juskora@users.noreply.github.com>
  • Loading branch information
nkostiv and juskora authored Oct 18, 2024
1 parent 2a6e0f0 commit 7ddffda
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/personalization/tracking_with_ibexa-tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ Otherwise a new one is created.

The Personalization JavaScript is a Google-like tracking API (ga.js) that you can paste
into your pages.
It activates the tracking by inserting <https://cdn.perso.ibexa.co/ibexa-tracker.js>
into the page.
It activates the tracking by inserting <https://cdn.perso.ibexa.co/ibexa-tracker.js> or
<https://cdn.perso.ibexa.co/ibexa-tracker.min.js> into the page.

To use this mechanism on your pages, copy the code snippet below, and replace:

- `<YOUR_MANDATOR_ID>` with the customer ID
- `<CONTENT_TYPE_ID>` with the Content Type ID
- `<CONTENT_ID>` with the content item ID
- `<USER_ID>` with an empty string for cookie based anonymous user or with the value generated by
your user identifier system for logged-in user. In case user activity should not be tracked,
'not_defined' value should be used to still have an event stored without a link to the user.

To use this mechanism on your pages, copy the code snippet below, and replace
`<YOUR_MANDATOR_ID>` with the customer ID, `<PAGE_ID>` with the page/item identifier 
and `<USER_ID>` with the one generated by your user identifier.
All identifiers can be any form of string.
Paste this snippet into your website template page so that it appears before
the closing `</head>` tag.
Expand All @@ -38,7 +44,7 @@ the closing `</head>` tag.
var yc = document.createElement('script');
yc.type = 'text/javascript';
yc.async = true;
yc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.perso.ibexa.co/ibexa-tracker.js';
yc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.perso.ibexa.co/ibexa-tracker.min.js';
var ycs = document.getElementsByTagName('script')[0];
ycs.parentNode.insertBefore(yc, ycs);
})();
Expand Down

0 comments on commit 7ddffda

Please sign in to comment.