Frequently Asked Questions
Common questions and answers about the OIR SDK.
The OIR SDK is a lightweight JavaScript tracking SDK designed for modern browsers. It provides event tracking, user identification, and cross-tab synchronization.
- Chrome 80+
- Firefox 75+
- Safari 13+
- Edge 80+
The SDK can be installed via CDN. See the Installation Guide for details.
Yes, the SDK is designed with privacy in mind:
- No PII collection by default
- Configurable data collection levels
- Secure cookie handling
The minimum required configuration:
oirid: Your publisher ID (from your account manager)oirtyp: Pixel type identifier
Yes, use the cfg() method:
window._oirtrk.cfg({
oirid: 'YOUR_INTEGRATION_ID',
oirtyp: 'YOUR_INTEGRATION_TYPE',
});
The brandedLinkDomain option enables first-party tracking using your own domain. See Configuration Guide for setup instructions.
Use the push() method:
_oirtrk.push([
'event',
{
event: 'event_name',
// event properties
},
]);
Yes, events are queued automatically:
window._oirtrk = window._oirtrk || [];
_oirtrk.push(['event', { event: 'early_event' }]);
// SDK loads later and processes queued events
Use the set command:
_oirtrk.push(['set', 'sessionId', 'abc123']);
// Or multiple values
_oirtrk.push(['set', { sessionId: 'abc123', userId: 'user_456' }]);
See the E-commerce Events guide for the complete list including:
view_item_list,view_item,select_itemadd_to_cart,remove_from_cart,view_cartbegin_checkout,add_shipping_info,add_payment_infopurchase,refund
Anonymous IDs are generated automatically when the SDK initializes. This browser-based identifier is used to track visitors across sessions and tabs.
Yes, use the global custom data feature to set custom identifiers for your own purposes:
_oirtrk.push(['set', 'customId', 'your-custom-id']);
_oirtrk.push(['set', 'puid', '12345']);
See the Global Custom Data Guide for more details.
Call identify when:
- User logs in
- User signs up
- User provides information during checkout
- User updates their profile
The SDK automatically coordinates across browser tabs using localStorage. Only one tab performs critical operations, and results are shared.
No, it works automatically without configuration.
The SDK falls back gracefully to single-tab mode.
No, the SDK is designed for minimal impact:
- Loads asynchronously
- Minimal initialization time
- Non-blocking event tracking
One request per event. Events are sent immediately using fetch with keepalive.
Check:
- SDK is initialized (
window._oirtrk.cfg()called) - Required configuration set (
oiridandoirtyp) - Browser console for errors
- Network connectivity
Check:
- localStorage/cookies are enabled
- Browser privacy settings
- Domain configuration
Check:
- localStorage is available
- Tabs are on the same domain
- Browser supports required features
Check:
- Script tag is correct
- CDN is accessible
- No ad blockers blocking
Contact your account manager with:
- SDK version
- Browser and version
- Steps to reproduce
- Console errors
Contact your account manager with your use case and requirements.