Hello, Rudderstack friends. Super basic newbie que...
# support
c
Hello, Rudderstack friends. Super basic newbie question here. I’m not sure what I’m doing wrong setting up the SDK on some boilerplate localhost HTML. I’ve pasted in the code snippet, and I’m calling
e.page()
at the end of it, but I don’t see any page load activity. What am I missing?
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
c
I was using the beta v3 code snippet, which didn’t work for me. Then, I used the minified JS, and it started working 🤷🏽‍♂️
m
Hi Scott, can you share the original code snippet that you were using?
c
Sure, one moment.
Copy code
<script type="text/javascript">
        !function(){"use strict";var sdkBaseUrl="https://cdn.rudderlabs.com/beta/3.0.0-beta";var sdkName="rsa.min.js"
        ;var asyncScript=true;window.rudderAnalyticsBuildType="legacy",window.rudderanalytics=[]
        ;var e=["setDefaultInstanceKey","load","ready","page","track","identify","alias","group","reset","setAnonymousId","startSession","endSession"]
        ;for(var n=0;n<e.length;n++){var d=e[n];window.rudderanalytics[d]=function(e){return function(){
        window.rudderanalytics.push([e].concat(Array.prototype.slice.call(arguments)))}}(d)}try{
        new Function('return import("")'),window.rudderAnalyticsBuildType="modern"}catch(a){}
        if(window.rudderAnalyticsMount=function(){var e=document.createElement("script")
        ;e.src="".concat(sdkBaseUrl,"/").concat(window.rudderAnalyticsBuildType,"/").concat(sdkName),e.async=asyncScript,
        document.head?document.head.appendChild(e):document.body.appendChild(e)},"undefined"==typeof Promise){
        var t=document.createElement("script")
        ;t.src="https://polyfill.io/v3/polyfill.min.js?features=globalThis%2CPromise&callback=rudderAnalyticsMount",
        t.async=asyncScript,document.head?document.head.appendChild(t):document.body.appendChild(t)}else{
        window.rudderAnalyticsMount()}window.rudderanalytics.load("2VcpLQHFrLSV05yVfVVDH5JvmRH","https://advancingelcxi.dataplane.rudderstack.com",{})}();        
</script>
It’s the boilerplate from the JS source I made.
m
Since the v3 SDK is new, I have not got the chance to play around with it. I ll let you know if I find something.
😎 1