Zudy Vinyl
Zudy Vinyl Applications
Before starting your application instrumentation, ensure that you have received your App Key from Pyze
Install
Installing Pyze Analytics for Vinyl is simple, and requires adding the Pyze Javascript as a site widget in the Vinyl IDE
Create a new site widget, and paste the below script within binder.js as shown:
define(function () {
const install = function (context) {
var pyzeAppKey= context.getParameter('AppKey');
!function(e,t){var s=e.Pyze||{_q:[]},i=e.PyzeEvents||{_q:[]},n=e.PyzeCuratedEvents||{_q:[]},r=e.PyzeIdentity||{_q:[]};function p(t,e){function s(e){t[e]=function(){t._q.push([e].concat(Array.prototype.slice.call(arguments,0)))}}for(var i=0;i<e.length;i++)s(e[i])}p(s,["initialize","getTimerReference","getAppInstanceId","postWebAppVersion","postPageView","setUserOptOut","deleteUser"]),p(i,["postCustomEvent","startTimerForEvent","postCustomEventWithAttributes","postTimedEvent","postTimedEventWithAttributes","postExplicitActivation"]),p(n,["post"]),p(r,["setUserProfile","resetUserProfile","updateUserProfile"]);var o=t.createElement("script"),a=t.getElementsByTagName("script")[0];o.type="text/javascript",o.async=!0,o.src="https://cdn.pyze.com/pyze.js",a.parentNode.insertBefore(o,a),e.Pyze=s,e.PyzeEvents=i,e.PyzeCuratedEvents=n,e.PyzeIdentity=r}(window,document),Pyze.initialize(pyzeAppKey);
console.log(pyzeAppKey);
}
return {
callbacks: {
install: install
}
};
});
Initialize
To initialize the Pyze SDK, add the site widget you created to your environment via the Control Panel:
Warning
Make sure you replacedYOUR_PYZE_APP_KEY with your own appKey
The Pyze SDK will now start capturing many automated metrics.
API Reference
Full API reference available here