I am trying to collect the referrer URL in Google Tag Manager and I want it to include the referring path page. I want to do this because I have multiple links from the same domain pointing to one form. I want to track which page is bringing in the most form fills and so that I can trigger an email series based on which landing page they came from.
For example, I have 3 landing pages directing to one of my forms:
www.site1.com/first-page-path
www.site1.com/second-page-path
www.site1.com/third-page-path
When I check the referrer variable in Google Tag Manager, it simply displays the domain name as follows:
referrer: https://www.site1.com/
How do I collect the the full URL including the page path so that it shows up like this:
referrer: https://www.site1.com/second-page-path
Any help would be appreciated.
It's limit by the referrer policy. These days, browsers usually set very restrictive defaults for the referrer policies, so only the referring domain is sent.
If you can manage the other domain or you can give each page with different form url.
You can add some parameter at the form url and add proper setting in GTM to retrieve it.
In general, referrer has always been a bit unreliable, and is now so limited that you probably should not use it for business critical purposes.
Related
Hi Hybris 1811 smartedit I am trying to edit Email Signup Modal but as soon as I click on the link it redirects me to below page. I have multiple sites so sometimes I am getting this warning: WARN [hybrisHTTP20] [DefaultCMSSiteService] More than one site associated with URL [https://localhost:9002/?site=XXXX]. Returning first. Did anybody faced similar issue?
The main problem is that you have more than one site containing the same urlPatterns
This attribute represents a regex that is used by CMSSiteFilter to decide the website that will be used based on the URL introduced in the browser or requested by smartEdit(i.e https://localhost:9002/?site=XXXX)
In this case, more than one instances of CMSSiteModel were found and the first one was used.
In order to fix this you need to adjust each site to have its own, unique urlPattern . If you have apparel and electronics sites, the regexes for both should look like this
apparel --> (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=apparel)(|\&.*)$
electronics --> (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=electronics)(|\&.*)$
This can be changed in backoffice for each and every site:
Make sure that the preview URL is also changed accordingly so that SmartEdit will know how to perform the HTTP requests for this site:
I understand the og:url meta tag is the canonical url for the resource in the open graph.
What strategies can I use if I wish to support 301 redirecting of the resource, while preserving its place in the open graph? I don't want to lose my likes because i've changed the URLs.
Is the best way to do this to store the original url of the content, and refer to that? Are there any other strategies for dealing with this?
To clarify - I have page:
/page1, with an og:url of http://www.example.com/page1
I now want to move it to
/page2, using a 301 redirect to http://www.example.com/page2
Do I have any options to avoid losing the likes and comments other than setting the og:url meta to /page1?
Short answer, you can't.
Once the object has been created on Facebook's side its URL in Facebook's graph is fixed - the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook's crawler in order to maintain that object in the future. (note that the object becoming inaccessible doesn't necessarily remove it from Facebook, but effectively you'd be starting over)
What I usually recommend here is (with examples http://www.example.com/oldurl and http://www.example.com/newurl):
On /newpage, keep the og:url tag pointing to /oldurl
Add a HTTP 301 redirect from /oldurl to /newurl
Exempt the Facebook crawler from this redirect
Continue to serve the meta tags for the page on http://www.example.com/oldurl if the request comes from the Facebook crawler.
No need to return any actual content to the crawler, just a simple HTML page with the appropriate tags
Thus:
Existing instances of the object on Facebook will, when clicked, bring users to the correct (new) page via your redirect
The Like button on the (new) page will still produce a like of the correct object (but at the old URL)
If you're moving a lot of URLs around or completely rewriting your URL scheme you should use the new URLs for new articles/products/etc, but you'll need to keep the redirect in place if you want to retain likes, comments, etc on the older content.
This includes if you're changing domain.
The only problem here is maintaining the old URL -> new URL mapping somewhere in your code, but it's not technically difficult, just an additional thing to maintain in the future.
BTW, The Facebook crawler UA is currently facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
I'm having the same problem with my old sites. Domains are changing, admins want to change urls for seo etc
I came to conclusion its best to have some sort uniqe id in db just for facebook - from the beginning. For articles for example I have myurl.com/a/123 where 123 is ID of the article.
Real url is myurl.com/category/article-title. Article can then be put in different category, renamed etc with extensive logic for 301 redirects behind it. But the basic fb identifier can stay the same for ever.
Of course this is viable only when starting with a fresh site or when implementing fb comments for the first time.
Just an idea if you can plan ahead :) Let me know what you think.
I'm trying to implement some omniture requests on server-side. I've got the calls set up, and the requests make it to omniture, but the referrer is not showing up in omniture.
Here is an example of one of the urls for omniture my code creates. Am I missing something?
http://[id].112.2o7.net/b/ss/[group]/1/H23.2/s1328206514850?AQB=1&ndh=1&ns=[id]&g=http%3A%2F%2F[domain]%2Flogin.asp&vid=1328206514850&pageName=Login%20Page%20!test!&r=http%3A%2F%2Ftest.com
The Internal URL Filters in the Report Suite Admin Console specifies what your internal domains are (i.e your domains). Any referal from any other domain will be recognised as a referrer.
I generally use a Firefox addon like WATS to debug the variables that are on a particular page, including referrer.
Keep in mind that there needs to be a referral from an external site. If you just type in the URL, or reload, or click from your own site, there is no referral. When testing this, I would create a page on another domain (e.g. localhost), and create a link to my page.
https://omniture-help.custhelp.com/app/answers/detail/a_id/1652/kw/JavaScript/related/1
COMPARISON: s.linkInternalFilters vs. Internal URL Filters
s.linkInternalFilters: The linkInternalFilters variable within the s_code.js file is used in exit link tracking. If s.trackExternalLinks is set to true, it is used to determine if a specific link a visitor clicked on is internal to your organization's site or not. Clicked links that match a value in s.linkInternalFilters are ignored, while links that do not match any values are sent to SiteCatalyst as an exit link.
Internal URL Filters: The Internal URL filters within the Admin Console is used in Traffic Sources reports, such as the Referring Domain report. Every s.t() request checks to see if the referring URL (contained within the referrer variable) matches any of the rules set up. Referring URLs that match any of these rules are excluded from all Traffic Sources reports, while referring URLs that do not are included.
It is recommended that s.linkInternalFilters and Internal URL filters match eachother, however the two operate completely independently and serve completely different functions.
The last part of that image is the referrer value, r= . Is that the correct value? Also you should check your Internal URL Filters in the admin console for that report suite. Typically for new report suites you will find the value of . (a single period) set in there. If you do have that then no referrers will be recorded.
I want to know how is this done. I make a site at weebly, ( it's a sitebuilder).
I get a site xxx.weebly.com
If I want my custom domain name, I set A record of custom domain name to point to server : 199.34.228.100
Question is, how that default application(on 199.34.228.100) works which takes my domain name and show the content of the site to me?
Suppose your custom domain name is 'mysite.com'. At weebly, you set the A record to 199.34.228.100 which is like saying 'when someone wants to access 'mysite.com' I want them to be sent to 199.34.228.100.
This information is given to all the dns servers around the internet over the next few hours but can sometimes take longer. Afterwards, whenever a request is sent out for 'mysite.com' it will be mapped to 199.34.228.100.
This is weebly.com and when the request arrives, it will come with information saying that the original request was for 'mysite.com'. Weebly then looks in it's records to see who wanted that to happen, see that you made the change and knowing that you have xxx.weebly.com, show that site.
I hope that helps
This process is called domain forwarding to external IP address.
The information about redirection is to be set in following order:
1)
first at A record - this information means that all internet traffic at "yourdomain.com" should be forwarded to weebly static IP address (one of several provided by weebly)
2)
make changes in weebly panel to configure your web page - entering "yourdomain.com" as main url
http://kb.weebly.com/domain-registrar.html
best,
Peter
Some e-Marketing tools claim to choose which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer.
I know you can get the immediate preceding page with HTTP_REFERRER, but how do you know where they were 6 sites ago?
Javascript this should get you started: http://www.dicabrio.com/javascript/steal-history.php
There are more nefarius means to: http://ha.ckers.org/blog/20070228/steal-browser-history-without-javascript/
Edit:I wanted to add that although this works it is a sleazy marketing teqnique and an invasion of privacy.
Unrelated but relevant, if you only want to look one page back and you can't get to the headers of a page, then document.referrer gives you the place a visitor came from.
You can't access the values for the entries in browser history (neither client side nor server side). All you can do is to send the browser back or forward a number of steps. The entries of the history are otherwise hidden from programmatic access.
Also note that HTTP_REFERER won't be there if the user typed the address in the URL bar instead of following a link to your page.
The browser history can't be directly accessed, but you can compare a list of sites with the user's history. This can be done because the browser attributes a different CSS style to a link that hasn't been visited and one that has.
Using this style difference you can change the content of you pages using pure CSS, but in general javascript is used. There is a good article here about using this trick to improve the user experience by displaying only the RSS aggregator or social bookmarking links that the user actually uses: http://www.niallkennedy.com/blog/2008/02/browser-history-sniff.html