Javascript 在Vuejs Web应用程序中集成Clevertap
我的任务是将clevertap与vuejs前端集成。但是clevertap是未定义的,如何在vuejs中声明clevertapJavascript 在Vuejs Web应用程序中集成Clevertap,javascript,vuejs2,clevertap,Javascript,Vuejs2,Clevertap,我的任务是将clevertap与vuejs前端集成。但是clevertap是未定义的,如何在vuejs中声明clevertap clevertap.event.push("Product Viewed", { "Product name":"Casio Chronograph Watch", "Category":"Mens Accessories", "Price":59.99, }); 您可以导入到项目中,该项目将为您提供clevertap对象,也可以将以下脚本添加到应用程序的
clevertap.event.push("Product Viewed", {
"Product name":"Casio Chronograph Watch",
"Category":"Mens Accessories",
"Price":59.99,
});
您可以导入到项目中,该项目将为您提供clevertap对象,也可以将以下脚本添加到应用程序的HTML中
<script type="text/javascript">
var clevertap = {event:[], profile:[], account:[], onUserLogin:[], notifications:[], privacy:[]};
// replace with the CLEVERTAP_ACCOUNT_ID with the actual ACCOUNT ID value from your Dashboard -> Settings page
clevertap.account.push({"id": "CLEVERTAP_ACCOUNT_ID"});
clevertap.privacy.push({optOut: false}); //set the flag to true, if the user of the device opts out of sharing their data
clevertap.privacy.push({useIP: false}); //set the flag to true, if the user agrees to share their IP data
(function () {
var wzrk = document.createElement('script');
wzrk.type = 'text/javascript';
wzrk.async = true;
wzrk.src = ('https:' == document.location.protocol ? 'https://d2r1yp2w7bby2u.cloudfront.net' : 'http://static.clevertap.com') + '/js/a.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wzrk, s);
})();
</script>
var clevertap={event:[],profile:[],account:[],onUserLogin:[],notifications:[],privacy:[]};
//用仪表板->设置页面中的实际帐户ID值替换为CLEVERTAP_ACCOUNT_ID
clevertap.account.push({“id”:“clevertap\u account\u id”});
clevertap.privacy.push({optOut:false})//如果设备用户选择不共享其数据,则将标志设置为true
clevertap.privacy.push({useIP:false})//如果用户同意共享其IP数据,则将标志设置为true
(功能(){
var wzrk=document.createElement('script');
wzrk.type='text/javascript';
wzrk.async=true;
wzrk.src=('https:'==document.location.protocol?'https://d2r1yp2w7bby2u.cloudfront.net' : 'http://static.clevertap.com“)+”/js/a.js”;
var s=document.getElementsByTagName('script')[0];
s、 parentNode.insertBefore(wzrk,s);
})();
资料来源:
这将全局创建一个clevertap对象,您可以在vue应用程序中使用window.clevertap。您可以将该对象导入到项目中,也可以将以下脚本添加到应用程序的HTML中
<script type="text/javascript">
var clevertap = {event:[], profile:[], account:[], onUserLogin:[], notifications:[], privacy:[]};
// replace with the CLEVERTAP_ACCOUNT_ID with the actual ACCOUNT ID value from your Dashboard -> Settings page
clevertap.account.push({"id": "CLEVERTAP_ACCOUNT_ID"});
clevertap.privacy.push({optOut: false}); //set the flag to true, if the user of the device opts out of sharing their data
clevertap.privacy.push({useIP: false}); //set the flag to true, if the user agrees to share their IP data
(function () {
var wzrk = document.createElement('script');
wzrk.type = 'text/javascript';
wzrk.async = true;
wzrk.src = ('https:' == document.location.protocol ? 'https://d2r1yp2w7bby2u.cloudfront.net' : 'http://static.clevertap.com') + '/js/a.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wzrk, s);
})();
</script>
var clevertap={event:[],profile:[],account:[],onUserLogin:[],notifications:[],privacy:[]};
//用仪表板->设置页面中的实际帐户ID值替换为CLEVERTAP_ACCOUNT_ID
clevertap.account.push({“id”:“clevertap\u account\u id”});
clevertap.privacy.push({optOut:false})//如果设备用户选择不共享其数据,则将标志设置为true
clevertap.privacy.push({useIP:false})//如果用户同意共享其IP数据,则将标志设置为true
(功能(){
var wzrk=document.createElement('script');
wzrk.type='text/javascript';
wzrk.async=true;
wzrk.src=('https:'==document.location.protocol?'https://d2r1yp2w7bby2u.cloudfront.net' : 'http://static.clevertap.com“)+”/js/a.js”;
var s=document.getElementsByTagName('script')[0];
s、 parentNode.insertBefore(wzrk,s);
})();
资料来源:
这将全局创建一个clevertap对象,您可以在vue应用程序中使用window.clevertap