wordpress - Escape a Shebang /#!/ in URL for Google URL Builder -


does know if/how can escape shebang or encode uri make link work in google analytics url builder? want add campaign parameters product page urls track ads success. url each individual product page looks this:

http://www.oursite.com/classic-movies/#!/title-of-movie/p/12345678

when put product page url url builder, says url invalid. think because of #!. have tried escaping out special characters, replacing shebang %23%21 or %21!

it appears valid in url builder, , builder generates link utm tags, when paste tagged link browser, not take our product page. takes our website, gives "sorry not exist" message.

i tried this:

http://www.oursite.com/classic-movies/?_escaped_fragment_=/title-of-movie/p/12345678

it generates link in builder , link product page of our website (yay!), url adds after campaign name: #!/title-of-movie/p/1234567

the shebang back! problem?

for reference, we're using ecwid storefront plugin wordpress site.

thanks in advance.

short answer

you should use url without fragment (hash part) base building urls queries (the part starting '?') , append hash part end of url.

example:

1) take http://www.example.com/classic-movies/#!/title-of-movie/p/12345678

2) remove hash part: http://www.example.com/classic-movies/

3) use hash-free url base , add query parameters or use automatic builder. example: http://www.example.com/classic-movies/?utm_source=myblog&utm_campaign=xyz&abc=def

4) append hash part end of url: http://www.example.com/classic-movies/?utm_source=myblog&utm_campaign=xyz&abc=def#!/title-of-movie/p/12345678

you're done – final url valid url work fine browser/customer, site server , tracking tools google analytics

long answer

1) urls different, structure quite same , that's part of web standards. url built way:

protocol://site/path?query#fragment

(i simplified , take in consideration parts we're talking about, actual scheme bit more complicated)

taking product page url, be:

  • protocol: http
  • site: www.example.com
  • path: classic-movies/
  • query: (empty)
  • fragment: !/title-of-movie/p/12345678

now, if want add query parameters, know insert them. fragment part, should in end, regardless of whether contains !

2) google analytics doesn't track fragment parts of urls. urls http://www.example.com/coolpage , http://www.example.com/coolpage#!anyparameter=anyvalue same goolgle analytics. that's reason why url builder tool doesn't accept that.

by way, ecwid uses fragment part of url time address product , category pages, that's not issue if want track product pages in google analytics. ecwid solved problem sending special 'virtual' page views google analytics every time customer browses store. in ga reports see store pages.

3) if use google adwords ad campaigns, i'd suggest linking google analytics , google adwords profiles have better picture of customer behavior , campaign performance. check out thread on ecwid forums details: http://www.ecwid.com/forums/showthread.php?t=10835


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -