Hey Team, Just started using RudderStack and seei...
# support
a
Hey Team, Just started using RudderStack and seeing something strange. Running the plan client side JS library on a Webflow site and see that all URLs are getting a second trailing slash in some fields, but not all. Any ideas what's causing this? Example event in thread (with redacted fields, but slashes still intact):
Copy code
{
  "anonymousId": "{redacted}",
  "channel": "web",
  "context": {
    "app": {
      "name": "RudderLabs JavaScript SDK",
      "namespace": "com.rudderlabs.javascript",
      "version": "2.22.3"
    },
    "campaign": {},
    "library": {
      "name": "RudderLabs JavaScript SDK",
      "version": "2.22.3"
    },
    "locale": "en-US",
    "os": {
      "name": "",
      "version": ""
    },
    "page": {
      "initial_referrer": "$direct",
      "initial_referring_domain": "",
      "path": "//treatment",
      "referrer": "{redacted}/",
      "referring_domain": "{redacted}",
      "search": "",
      "tab_url": "{redacted}/treatment",
      "title": "{redacted}",
      "url": "{redacted}//treatment"
    },
    "screen": {
      "density": 2,
      "height": 1117,
      "innerHeight": 583,
      "innerWidth": 1538,
      "width": 1728
    },
    "sessionId": 1675262394371,
    "traits": {},
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
  },
  "integrations": {
    "All": true
  },
  "messageId": "{redacted}",
  "originalTimestamp": "2023-02-01T14:48:12.032Z",
  "properties": {
    "initial_referrer": "$direct",
    "initial_referring_domain": "",
    "path": "//treatment",
    "referrer": "{redacted}/",
    "referring_domain": "{redacted}",
    "search": "",
    "tab_url": "{redacted}/treatment",
    "title": "{redacted}",
    "url": "{redacted}//treatment"
  },
  "rudderId": "{redacted}",
  "sentAt": "2023-02-01T14:48:12.035Z",
  "type": "page",
  "userId": ""
}
h
Hey @average-monkey-86292, Can you provide your site URL where Rudderstack JS SDK is integrated? It will help me debug this.
a
@high-zoo-17436 sure thing: https://www.femgevityhealth.com/
@high-zoo-17436 let us know if you find anything!
h
We are looking into it. Will update you.
Hi @average-monkey-86292, For the fields
path
and
url
we use the canonical url to get the values. But it seems there is an extra
/
in
<link href="https://www.femgevityhealth.com//" rel="canonical">
on your site that is causing this issue.
a
ah - that makes sense. figured you'd use something like document.url, but will take a look to see if that's misconfigured. thank you!
🙌 1
h
If canonical URL is not available then we use
window.location.href
a
Looks like someone had a trailing slash there setup in the canonical URL field in webflow, removing it fixed it. Thanks!