Is it possible to trigger a browser's text search in the URL? - url

I'm imagining putting a search term in the URL # fragment, like say:
http://blah/#__text_search__=art
And when the user pastes this URL into their browser, or clicks on it in e-mail or whatever, it boots up with the search feature activated, like so:

This is not possible via the URL as that's part of the website the user is visiting
If it were possible via URL then the #__text_search__=art would also be sent to the website.
It may or may not be possible via other means but that will likely be in a browser-dependent way.

Related

How to share URL with UTM parameters on WhatsApp

I have given an option to my users to share my website on whatsapp. And I want to know how many users land back on the website using the shared link. Hence, the shared button opens this link:
https://wa.me/919876543210?text=https://www.mywebsite.com?utm_source=whatsapp&utm_medium=share
But this URL considers the end &utm_medium=share as a part of the wa.me URL, and shares only https://www.mywebsite.com?utm_source=whatsapp on WhatsApp. So instead I did this:
https://wa.me/919876543210?text=https://www.mywebsite.com?utm_source=whatsapp%26utm_medium=share
which shares the correct URL on whatsapp: https://www.mywebsite.com?utm_source=whatsapp%26utm_medium=share, but when I open it, the UTM params are not captured by GA.
What is the way out of this loop?
There's a more elegant way of doing it than utm params. Have something like: https://wa.me/919876543210?text=https://www.mywebsite.com?t=wa
See how now it's shorter and more elegant to a user? Now you have two good options.
Make a conditional redirect on your site from any url that has a t=we query param to whatever utm param you want with no restriction.
And even more elegantly: use GTM to parse pageviews where there's a t query parameter set, then make a neat lookup table where the input would be the value of t and the output - whatever you want to name it. Then use that lookup table's value to set your session-level custom dimension in pageviews.
Why a custom dimension and not UTM? Because when using UTMs, you're affecting your attribution. And sessions. You can easily override organic or paid attribution with some meaningless whatsapp attribution. Well, yes, if you don't use attribution at all and you don't care about GA session breakpoints, then sure, UTMs are just easier.
Also, try escaping the &, but not much hope there.

How to set a search engine in Firefox to redirect to an extension

I am developing a search engine extension for Firefox and I want to set it as (default) search engine using JavaScript. That means, if
somebody wants s/he should be able to type some query into the search field or the address field and the search should be redirected to the
extension. This is pretty easy to do when the target URL is a real address like http://mysearch.com (see this SO question and the relevant Mozilla Developer documentation), but it does not work if you try it with an extension URL
like resource://my-search-extension/search.html. Is there some way to still achieve this, e.g. by some hook listening on query inputs in
the search or address field?
P.D. You can set up a bookmark shortcut so that you can redirect a search like s keyword to an extension, but this not a convenient option
in my case.

putting userid (or username) in url as querystring in Desire2Learn

I need to put a link in D2L to an external website. When the user click the link, his username should be included in the url, something like: www.abc.com/index.aspx?username=user1
Is there any parameter that can allow me do that easily? Like: index.aspx?username={userid}
Thanks!
I believe that the user name of the currently-logged-in user is one of the replacement strings that you can use in links placed in the LMS' UI. However, replacement strings do not get processed in all the places you could put a link in the LMS: for example, if you write a link into a discussion thread post or the like, I'm not sure that a replacement string used there would get expanded.
If you search on the web for "Desire2Learn replacement strings", you'll find a variety of pages hosted by various educational institutions that document a list of replacement strings that might work for you (in fact, {UserName} seems to be the one you want).
You should be aware thought that when you use a replacement string in an outbound URL that sends the information in the clear through the network: you may want to do this with caution, for privacy/security reasons.

hide hyperlink text of anchor <a> tag in browser status bar but it should navigate

I have a referral project.
In that there is an agent between the
affiliate(my site) and the target site.
So all hyperlinks displayed in my
site will be redirected to the agents
site and then it is redirected to the
target site.
The hyperlink itself is the link to
the agents site.
So i am displaying all products. I
have given links to them. When users
hover a hyeprlink you can see the
href text displayed in the status bar
which will be the agents site.
The requirement is the hyperlinks of
an agent site should not be displayed
in the status bar.
My solutions and assumptions
So i can use span onclick =
window.location = hrefOfAgentLink.
I have seen in other sites that they
redirect to another scripting page
and then the redirection takes
place. for example
http://sitename.com/click/id=32.
The id refers to the hyperlink in
database. hope they fetch the link
and they do a location header to
redirect to the agent page.
Why so? because the user should not see where the link goes.
I want to know whether there is(are) any other option(s) so that the hyperlink will not be visible in the status bar and in the address bar when it is redirecting.
Anyway when redirecting the agents url is not visible because it immediately redirects to the target site.
I would like to have the stackoverflow users suggestions. Thank you.
You used to be able to set the status bar message using javascript, but you can not do that reliably anymore. This is most probably because the browser wants to protect the user. Instead of trying to hide the URL, perhaps you should work on a "redirect-URL" that looks reliable and that makes it obvious to the user both that it is a redirect-URL and where it is going. For example this kind of URL would both make me aware of where I am going and that my access is going to be recorded:
tracker.my-ad-network.com/stacktrace.com/ad/568
Instead of something like this (that would not make me feel safe):
dashj2.gggfbad.com/index.php?aid=1232808432&ref=123432.
And as noted above, start accepting serious attempt to help you or people will simply stop :)
Piotr
You can use the new data attribute so your code would look something like this:
link text
Then in your JS, if you're using jQuery for example:
$('a').click(function(e){
e.preventDefault();
var loc = $(this).data('redir');
window.location = loc;
}
Not too hacky for what you're trying to accomplish.

hash sign in facebook urls

I wonder, why facebook.com (hypem.com, etc.) choose a hash sign after domain to path other files. like http://www.facebook.com/#!/reqs.php#event (#!/reqs.php).
What is the reason, and they map them with javascript?
Google explains it here:
http://code.google.com/intl/en-US/web/ajaxcrawling/
http://code.google.com/intl/en-US/web/ajaxcrawling/docs/learn-more.html
Mostly the hash sign is used in urls so that when you visit it, you are taken to specific location in the page without your scrolling manually.
They do it like this so when, for example, you're in photos and you hit the photo Next button. This does an ajax request and gets the next photo. The problem with this is that the request doesn't change the url, and the user won't be able to Bookmark this new url!
So, they use the anchor part of the url to store these query string values.

Resources