I am running into an issue while using Share feature of LinkedIn when the shared URL has "#" in it.
My URL looks like this: http://shoshin.glgqa07.com/#!/content/detail/High-pay-without-advanced-degrees
When I share this URL on LinkedIn, it strips out everything after "#". So the page linked on the LinkedIn is pointing to http://shoshin.glgqa07.com/.
I am using following URL to Share page to LinkedIn.
http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fshoshin.glgqa07.com%2F%23!%2Fcontent%2Fdetail%2FHigh-pay-without-advanced-degrees&title=The+Shoshin+Project+%3A+QA+tesing&summary=&source=
When I do View Source on the above page (Shared news on LinkedIn page), the Hidden Input field "contentUrl-shareForm" has value "http://shoshin.glgqa07.com/" instead of the complete URL.
I am using ShareThis library to implement this feature.
Does anyone know solution to this problem?
Did you try to replace the sharp sign (#) with the ASCII code %23
Related
I seem to have a problem with my Google Analytics.
My pages are being shown as 404 errors as the full URL address is being repeated after the foldername.
Example:
My page for cars is:
/cars/
But Google Analytics is showing this page as
/cars/www.domain.com
There are no filters set that I can see but I don't know how to resolve it.
Is this common? It is a Wordpress site.
You have a link somewhere that starts with www.example.com, but should start with http://www.example.com (or https://www.example.com).
URLs that don't start with a protocol (http://, https:// or just :// to mean "the same protocol this document was requested with") or a / are interpreted to be relative to the current document, e.g. if you are on http://www.example.org/cars/ and you link to "mercedes/", it yields http://www.example.org/cars/mercedes/. This is what happens for you, because you have an incomplete URL somewhere. Look at your document source in your browser and search for www.example.com. You will most likely find something like href="www.example.com". Find the link in your post / template that is responsible, and change it to href="http://www.example.com" or href="https://www.example.com", depending on what that host supports.
In some cases, you might find that Google Analytics is adding your domain name after every URL slug captured and it can make for some messy reporting.
For example, our homepage would return
/nichemarket.co.za
and the blog page would return
/blog/nichemarket.co.za
If your site analytics account returns a similar issue, this is not standard practice and is generally due to a misconfiguration of the view filter.
To fix this issue head over to your Google Analytics account and click the Admin tab in the right-hand menu.
Navigate to view
Select view settings
Scroll down to default page
Remove your domain name from the text box and leave it blank
Click save
I'm writing a simple reverse proxy program with flask. After a suitable setting, when someone visit a site such as aa.com, he gets the content of bb.com in fact without awareness. But when I want to proxy for search engine like google, I have little trouble.
I use anonymous.com as a agent of google.com, when someone visit anonymous.com, he get response from google actually. When I search some keywords such as 'demo', anonymous.com shows visitor just the result looks like real google's search result, except the links contains google.com are converted to anonymous.com. That's say all the result page's url such as
http://google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjpgP2Q3JrOAhWCjJQKHSMwAgEQFgghMAE&url=http%3A%2F%2Fwww.demo.com%2F&usg=AFQjCNEhAvTJreNJk_ukM_GYaLJwgHKHDw&sig2=Cll-LhXvW58WfthywPoH7A
will turns to a new link:
http://anonymous.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjpgP2Q3JrOAhWCjJQKHSMwAgEQFgghMAE&url=http%3A%2F%2Fwww.demo.com%2F&usg=AFQjCNEhAvTJreNJk_ukM_GYaLJwgHKHDw&sig2=Cll-LhXvW58WfthywPoH7A
Then when I click the new link, it open a new tab as well but the url address in the page's bar does not change to http://www.demo.com/ehome/index.php?eventid=29414& as the real google link do. Why not?
Futher more:
What makes the url address changed when I visit a link such as google's search's result.
I notice the real page's address appear in the result link in google.com, but in baidu.com, the link looks like https://www.baidu.com/link?url=YvUsjKkfDWJgNAdKyIiWWwdYN1f7HKId8Jzw1LYtTTVpSjOVDzLcVcZ48nMjEqwpvvMtCZfXwmHRJoqZLOCFNq&wd=&eqid=c9a2689600068b8f00000006579c6198, why does not this search engine just use the real url?
The JavaScript code along with the page received checks the url's domain name and redirects the site to the original google.com.
This is SO annoying.
The Issue is a matter of two scenarios behaving differently when I expect (and wish) them to be the same, these relate to the same webpage/article which features both Facebook Comment widget and a Share icon.
It's important to mention that the webpage is a Wordpress article, and we redirect:
from www.example.com/wordpress/articles/news/thearticle
to www.example.com/news/thearticle
The issue explained:
Scenario 1) I visit the article and type a facebook comment, I also click 'Also Post on Facebook'. When I view may facebook wall and see the share with the comment I just made, the link is linking back to the wordpress URL - I do not want this.
Scenario 2) I visit the article and share it through the Share icon. On my wall this time the linkback URL is the short one - this is good.
Important info regarding debugging
My OG URL tag is correct:
<meta property="og:url" content="http://www.example.com/news/thearticle"/>
Facebook debugger is picking up the correct desired URL as above,
also listing the desired Fetched URL and Canonical URL. All seems to
be what I want it to be.
This is true regardless of whether or not I
scrape the URL before or after I try this procedure.
Even if I then go back and do another comment with 'also post on FB' after doing a scrape with FB debugger, still the share links to the wrong/long format/original URL.
However, if I at any point share via the share icon, not the comment-share, the desired URL is present as per the OG URL.
If I do a comment-share, then an icon-share, then another comment-share, the comment share ones still have the wrong URL even though the icon-share had the correct one!
Any ideas? Thanks so much in advance to anyone who can help :)
It seems that the Comments FB plugin doesn't get the page info from OpenGraph, but expect a data-href attribute, or if not provided will use the current url by default.
From the doc:
data-href
Description : The absolute URL that comments posted in the plugin will be permanently associated with. Stories on Facebook about comments posted in the plugin will link to this URL.
Default : Current URL.
So what you need to do is to provide the valid URL as an HTML5 attribute on your plugin wrapper:
<div class="fb-comments" data-href="http://www.example.com/news/thearticle" data-numposts="5"></div>
Does anyone know if/how I can escape the shebang or encode the uri to make a link work properly in google analytics url builder? I want to add campaign parameters to product page urls to track ads success. The url for each individual product page looks like this:
http://www.oursite.com/classic-movies/#!/Title-of-Movie/p/12345678
When I put the product page url into the url builder, it says the url is invalid. I think it is because of the #!. I have tried escaping out the special characters, replacing the shebang with %23%21 or %21!
It appears valid in the url builder, and the builder generates a link with utm tags, BUT when you paste the tagged link into the browser, it does not take you to our product page. It takes you to our website, but gives a "sorry does not exist" message.
I also tried this:
http://www.oursite.com/classic-movies/?_escaped_fragment_=/Title-of-Movie/p/12345678
It generates a link in the builder and does link to the product page of our website (yay!), but the url adds this after the campaign name: #!/Title-of-Movie/p/1234567
The shebang is back! Will that be a problem?
For reference, we're using the Ecwid storefront plugin for a wordpress site.
Thanks in advance.
Short answer
You should use the URL without fragment (hash part) as a base for building URLs with queries (the part starting with '?') and then append the hash part to the 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 this hash-free URL as a base and add query parameters yourself or use any automatic builder. Example: http://www.example.com/classic-movies/?utm_source=myblog&utm_campaign=xyz&abc=def
4) Append the hash part to the end of the URL: http://www.example.com/classic-movies/?utm_source=myblog&utm_campaign=xyz&abc=def#!/Title-of-Movie/p/12345678
You're done – the final URL is valid URL which will work fine for browser/customer, your site server and tracking tools like Google Analytics
Long answer
1) URLs could be very different, but their structure is actually quite the same and that's a part of the web standards.
URL is built this way:
protocol://site/path?query#fragment
(I simplified it and take in consideration only the parts we're talking about, the actual scheme is a bit more complicated)
Taking your product page URL, that will be:
protocol: http
site: www.example.com
path: classic-movies/
query: (empty)
fragment: !/Title-of-Movie/p/12345678
Now, if you want to add query parameters, you know where to insert them. As to the fragment part, it should be always in the end, regardless of whether it contains !
2) Google Analytics doesn't track the fragment parts of the URLs.
Urls like http://www.example.com/coolpage and http://www.example.com/coolpage#!anyparameter=anyvalue are the same for Goolgle Analytics. That's likely the reason why their URL builder tool doesn't accept that.
By the way, Ecwid uses fragment part of the URL all the time to address the product and category pages, but that's not an issue if you want to track your product pages in Google Analytics. Ecwid solved that problem by sending special 'virtual' page views to Google Analytics every time a customer browses your store. So in your GA reports you will see your store pages.
3) If you use Google Adwords for your ad campaigns, I'd suggest linking your Google Analytics and Google Adwords profiles to have better picture of customer behavior and the campaign performance. Check out this thread on Ecwid forums for the details:
http://www.ecwid.com/forums/showthread.php?t=10835
Is there a way to post a comment for a given url programmatically in facebook?
I am not sure you can do that by simply passing a variable in a url, but you may be interested to learn more from their developer section. For open graph, I see on the Facebook Developer site that you can only implement LIKES but not comments.