I'm having an issue using the [current-page:url] token in a webform. What we're trying to do is track where people are coming from based on the URL Alias they use to visit a page and complete the form. For example, node/### has the following aliases:

example/a
example/b
example/c

These various aliases are distributed throughout magazines, websites, etc. We'd like to track which link people use when they fill out the webform, so we can know where they heard about the page. However, when I use the token [current-page:url] to try and capture the URL, it always uses the canonical url, not the url alias the person is actually at. I have also tried:

[current-page:url:brief]
[current-page:url:path]
[current-page:url:relative]
[current-page:url:absolute]

with no success.

Not sure if this should be posted here or in webform, but hoping to get some direction on why this might be happening, I'm stumped.

Thanks

Drupal 7.14

Comments

Dave Reid’s picture

Status: Active » Closed (cannot reproduce)

By default [current-page:url] does return the aliased version. The problem is likely *when* does token replacement actually happen in Webform? Because if it happens when the user is still on example/a, then it should work as expected. You'll need to file an issue in Webform.