1"use strict";(self["webpackChunkconveyour_ui"]=self["webpackChunkconveyour_ui"]||[]).push([[22196],{7433:function(t,e,s){s.r(e),s.d(e,{default:function(){return k}});var n=s(13180),i=s(12498),a=function(){var t=this,e=t._self._c;return e("div",[e("field-block",{staticClass:"mt-5",scopedSlots:t._u([{key:"title",fn:function(){return[t._v(" 1. Integrate with your Website "),e("smart-tooltip",{attrs:{type:"conveyour-analytics-with-javascript",category:"integrations",link:""}})]},proxy:!0}])},[e("p",{staticClass:"mb-3"},[t._v(" Create an Analytics-type API key in "),e("router-link",{attrs:{to:t.apiAccessLink}},[t._v("API Access")]),t._v(", then paste the token into your site snippet below. ")],1),e("p",{staticClass:"mb-0"},[t._v(" Domain: "),e("strong",[t._v(t._s(t.domain))])])]),e("field-block",{attrs:{title:"Active Analytics keys"}},[t.keys.length?e(i.A,[e("thead",[e("tr",[e("th",[t._v("Name")]),e("th",[t._v("Service account")]),e("th",[t._v("Expires")])])]),e("tbody",t._l(t.keys,function(s){return e("tr",{key:s.id},[e("td",[t._v(" "+t._s(s.name)+" "),s.is_legacy?e(n.A,{staticClass:"ml-1",attrs:{"x-small":"",color:"warning"}},[t._v(" Legacy ")]):t._e()],1),e("td",[t._v(t._s(s.owner?.name||"â"))]),e("td",[t._v(t._s(t.expirationLabel(s)))])])}),0)]):e("p",{staticClass:"mb-3"},[t._v(" No Analytics keys yet. "),e("router-link",{attrs:{to:t.apiAccessLink}},[t._v("Create one in API Access")]),t._v(". ")],1)],1),e("field-block",{attrs:{title:"Optionally install the JavaScript library for your site."}},[e("p",{staticClass:"mb-2 text-caption"},[t._v(" Replace token with the value from your show-once key creation dialog. The app key is filled in automatically. ")]),e("textarea",{attrs:{readonly:""},domProps:{value:t.snippetText}})])],1)},r=[],o=s(61642),c=s(1910),p=s(65012),l={name:"IntegrationAnalytics",components:{SmartTooltip:p.A},data(){return{keys:[],domain:"",appkey:"",resource_domain:"conveyour.com",snippetToken:"YOUR_TOKEN"}},computed:{apiAccessLink(){return{path:"/settings/api-access",query:{tab:"keys",type:"analytics"}}},snippetText(){return`<script type="text/javascript">\n (function(g) {\n var ns, script, first;\n\n ns = 'Conveyour';\n g[ns] = g[ns] || {};\n g[ns].config = {\n domain: '${this.domain}',\n appkey: '${this.appkey||"YOUR_APP_KEY"}',\n token: '${this.snippetToken}'\n };\n g[ns].identify = function() { g[ns].q = g[ns].q || []; g[ns].q.push({m: 'identify', as: arguments}); };\n g[ns].track = function() { g[ns].q = g[ns].q || []; g[ns].q.push({m: 'track', as: arguments}); };\n script = document.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.src = 'https://${this.resource_domain}/js/cdn/analytics.v1.min.js';\n first = document.getElementsByTagName('script')[0];\n first.parentNode.insertBefore(script, first);\n })(window);\n <\/script>`}},methods:{...(0,c.i0)("apiAccess",["loadApiKeys"]),expirationLabel(t){return t.expiration?t.is_expired?"Expired":new Date(1e3*t.expiration).toLocaleDateString():t.is_legacy?"Legacy expiry":"Never"},async loadKeys(){this.keys=await this.loadApiKeys("analytics")||[]},async loadAppkey(){try{const t=await(0,o.A)().get("api-keys/appkey")||{};this.appkey=t.appkey||""}catch(t){this.appkey=""}}},mounted(){this.domain=window.location.hostname,this.loadKeys(),this.loadAppkey()}},y=l,u=s(81656),d=(0,u.A)(y,a,r,!1,null,"784c1e12",null),k=d.exports}}]); 2//# sourceMappingURL=view-settings-integrations-forms-IntegrationAnalytics-vue.dec11a36.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.