Skip to content

Instantly share code, notes, and snippets.

<%
myPayload = {
"productevents": [{
"CreatedBy": "Infinity",
"ModifiedBy": "Infinity",
"SourceID": "Infinity",
"SourceCustomerID": "sampleId",
"ProductAction":"Purchase"
}]
};
SELECT
LATEST(data.wt.vt_s) AS 'data.wt.vt_s',
LATEST(process_number) AS 'process_number',
LATEST(data.wt.sr) AS 'data.wt.sr',
LATEST(data.wt.tx_e) AS 'data.wt.tx_e',
LATEST(ext.geo.latitude) AS 'ext.geo.latitude',
LATEST(data.wt.clip_vol) AS 'data.wt.clip_vol',
LATEST(data.wt.ce) AS 'data.wt.ce',
LATEST(data.wt.clip_mode) AS 'data.wt.clip_mode',
LATEST(data.wt.tm_pagedns) AS 'data.wt.tm_pagedns',
@infy-oracle
infy-oracle / CX Tag Library Loader.html
Last active September 13, 2022 14:32
Allows you to fire requests to Infinity where a different CX Tag is already implemented.
<!-- Must fire on every page -->
<!-- This code will fire the odc.js if it isn't already present -->
<script type="text/JavaScript">
(function() {
var accountGUID = "f1b66dd938f9483018795bb87054be64";
var tagID = "mec_tag";
//var config = "analytics:test"; // Only requires if firing a container other than production (e.g. _ora.config=analytics:test)
// DO NOT EDIT BELOW THIS LINE
@infy-oracle
infy-oracle / ora_collect.js
Last active September 13, 2022 12:54
Allows you to fire requests to Infinity where a different CX Tag is already implemented. Note : CX Tag with Infinity module must be present on page in order to work
(function(){
// Config
var accountGUID = "c30c97282f3d4f0d2daafcd03087ec9a";
// Declare : call type
var callType = "view"; // 'view' for ORA.view(), 'click' for ORA.click() or an integer for a custom event code (e.g. 150)
// Declare : call type
var cxDataObject = {
<!--
NOTES :
- These should be deployed as two separate Custom HTML tags in GTM
- Trigger details are in each code block below
-->
<!-- 1. Library Loader
- Trigger on DOM Ready on article pages WHEN 'You’ve reached your limit of free articles.' shows
<script>
(function() {
var accountGUID = "ACCCOUNTGUID"; // Set to 'ACCOUNT_GUID' IN //d.oracleinfinity.io/infy/acs/account/ACCOUNT_GUID/js/TAG_ID/odc.js?_ora.config=CONFIG
var tagID = "TAGID"; // Set to 'TAG_ID' IN //d.oracleinfinity.io/infy/acs/account/ACCOUNT_GUID/js/TAG_ID/odc.js?_ora.config=CONFIG
//var config = "analytics:test"; // Set to 'CONFIG' IN //d.oracleinfinity.io/infy/acs/account/ACCOUNT_GUID/js/TAG_ID/odc.js?_ora.config=CONFIG
// DO NOT EDIT BELOW THIS LINE
for (var odc_requested = !1, scripts = document.getElementsByTagName("SCRIPT"), s = 0; s < scripts.length; s++) scripts[s].src && /oracleinfinity.*odc\.\js/.test(scripts[s].src) && (odc_requested = !0);for (var links = document.getElementsByTagName("link"), s = 0; s < links.length; s++) links[s].href && /oracleinfinity.*odc\.\js/.test(links[s].href) && (odc_requested = !0);if (!odc_requested) {var sc_scripts = document.getElementsByTagName("script")[0],sc = document.createElement("script");if (sc.async = !0, void 0 === config) va
<script>
/*
DWELL TIME CALCULATOR
Notes:
- Uses 'performance.timing.navigationStart' to calculate time on page
- Will NOT calculate page time between ORA.view() calls - only on the actual DOM page load
- Will ping an Infinity call every X ms with page dwell times:
- "pct_spread" mode will ping less over time (designed to ping over pre-calculated distribution curve)
<!-- CX Tag - Page View -->
<script type="text/javascript">
// Declare your data
var cxDataObject = {};
// If this is a product view...
if({{ecommerce detail products}} && typeof {{ecommerce detail products}} === "object"){
var ecommerceDetailProducts = {{ecommerce detail products}};
// Reco Module Click
(function() {
var cxDataObject = {};
cxDataObject["wt.feature"] = "recommendations";
cxDataObject["wt.event_type"] = "module clicked";
cxDataObject["wt.variant"] = "reco - 2-column"; // Insert variant name
// Optional
@infy-oracle
infy-oracle / developer_mode_query.sql
Last active June 10, 2022 16:01
Run in new Action as [developer mode](https://docs.oracle.com/en/cloud/saas/marketing/infinity-develop/docs/actions/using_developer_mode.htm) query. - Create a new 'Action' - Use this below query as a [developer mode](https://docs.oracle.com/en/clou
ON TRIGGER (
NOT behavior.[Close session]
)
SELECT
data.wt.product_name AS 'Product Name',
data.wt.co_f AS 'Infinity Cookie ID'
WHERE