Using Gmail message source, generate direct link - hyperlink

So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface?
on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following
https://mail.google.com/mail/#all/<HexEncodeMessageID>
Is this related to the Message=ID header found in the mail's source?
Message-ID: <SomeID#SomeID.mail>
The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions.

Update
This bookmarklet no longer works. See Benjamin Ziepert's update.
Original Answer
I decided to make a bookmarklet to help automate this.
javascript:window.location="https://gmail.com/#search/rfc822msgid:"+encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/i)[1])+"/"+encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function(x){return x.slice(0,3) == "th="})[0].slice(3));
Save this link on your bookmarks bar.
To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
If anyone has suggestions for a clean way to do this without having to click show original, I'm all ears.

The "HexEncodeMessageID" that you refer to (and that occurs in links such as https://mail.google.com/mail/#inbox/14197d2548c9da1a) is unfortunately different from the RFC822 message ID (which occurs in the source of the email).
I do not know of any way to get a direct link to an email using the RFC822 message ID, but it is possible to search for a particular RFC822 message ID in Gmail (see GMail doc):
in:anywhere rfc822msgid:SomeID#SomeID.mail
You can turn this into a link:
https://mail.google.com/mail/#search/in%3Aanywhere+rfc822msgid%3ASomeID#SomeID.mail
(Don't forget that the message id should be URL-encoded. You can also just type the search in your GMail and copy the resulting URL afterwards.)
The problem with this link is that it does not send you to the mail directly, but to a search result page with a single hit. But this might be good enough for some applications.
The advantage is: The RFC822 is the same in your account and in the account of the sender. So if you want to refer to a given email in an email/chat, you can provide this search link (assuming the recipient also uses GMail). With the "HexEncodeMessageID" this would not work, because it is different in every account (according to my own experiments).
One last thing: the link only works when you are already logged in.

Here's an updated bookmarklet over what Benjamin Ziepert suggested. Basically with removed /u/0 part to make it a little more account-independent.
javascript:window.open("https://mail.google.com/mail/#search/rfc822msgid%3A" + encodeURIComponent(document.getElementsByClassName('message_id')[0].innerHTML.slice(4, -4)), "_self");
Usage: Save this link on your bookmarks bar. To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.

Related

Direct tweet reply URL link? URL Query String for Twitter Tweet Reply?

How do I generate an URL that will automatically open the "tweet your reply" compose window?
Example Tweet: https://twitter.com/CanadiensMTL/status/1490808598242512898
What I thought would work (but doesn't): https://twitter.com/compose/tweet/1490808598242512898
Instead of actually making a person click the reply button, it'll just auto-open the compose box for a specific tweet.
Normally, I can just right click copy link, but when I'm on twitter, there is no copy link option when I right click because it's a <button> and not an <a> I guess... and when I left click the speech bubble reply icon the url bar says https://twitter.com/compose/tweet but I was hoping to specifically find a "compose tweet reply" link to generate. In a perfect world I thought I would just be able to visit https://twitter.com/compose/tweet/1490808598242512898 but that doesn't work.
I was able to scrape some "specific" urls but nothing that "replies". Any ideas?
https://twitter.com/GameSpot/status/1490844073187442692
https://twitter.com/GameSpot/status/1490844073187442692/likes
https://twitter.com/GameSpot/status/1490844073187442692/retweets
https://twitter.com/GameSpot/status/1490844073187442692/retweets/with_comments
I was able to find answer thanks to another post I found on stackoverflow:
https://twitter.com/intent/tweet?in_reply_to=TWEET_NUMBER
and just replace / swap TWEET_NUMBER

Get a review link with Google My Business API

Is there a way to get the link of a review using the GMB APIs?
The closest to what I need is this:
https://www.google.com/maps/contrib/113400145807499011881/place/ChIJSRSm38NhLxMRBgg2EGMZqKc/
Where the first ID (113400145807499011881) is the ID of the user who left the review, and the second ID (ChIJSRSm38NhLxMRBgg2EGMZqKc) is the place ID.
However, the review object returned by the API does not seem to contain enough information to obtain the reviewer user ID.
Thank you,
Guido
I was searching for a way to get the url to the review overview for a specific location via the API too.
After checking the links, IDs ect. in the API Responses and lots of documentations an tuturials i found NO way to get the link over tha API.
BUT a workarround with a few manual steps can help to find the link (I know that is not a final answer to the question, but maybe it is still helpfull)
go to google search, and search for you Location/ Company that contains the reviews
on the right side you should see a pannel that shows the current stars for your location and a link "xxxx Google-Rezensionen"
klick on this link and copy the url in the browser
(optional remove parameters like "&client" ect.
Check this youtube-video of the Step by Step Tuturial to see a tuturial how you can do this.
newReviewUrl is the Parameter if someone read this:
https://developers.google.com/my-business/reference/rest/v4/accounts.locations#urlattributevalue

Google Analytics Custom URL Reorting

I have used custom url builder to build custom url and submitted to different directories.
URL is
?utm_source=directory&utm_medium=referral&utm_campaign=DirectoryReferrals
Now i am stuck with reporting coz it shows source as "directory" thats what i need it to show but full referral part is showing as not set.
How can i get full url of the referral source? Need help as soon as possible.
Is there any way to get the url of the referral?
I think you may be misunderstanding the usage of the utm_source parameter in the context of custom campaigns. It wouldn't be used to get the source URL that you used when tagging your campaign, but rather it should show the source where the campaign is originating from, for example advertiser, site (eg. "google"), publication (eg. "newsletter", "billboard"). More information on campaigns can be found here: https://support.google.com/analytics/answer/1033863. Also some good info on why you are getting "not set": https://support.google.com/analytics/answer/2820717?hl=en.
If you are trying to see where traffic is coming from, eg. www.google.com, www.facebook.com, then you wouldn't use custom campaigns for that.
Hope this helps.
I agree with Nyuen, you might have misunderstood the concept of UTM tracking code.
I would suggest that if you want to know that from which referral source you got the traffic then you can write it under UTM_SOURCE.
Suppose if you have promoted your post in the Facebook and Google, then in the UTM_SOURCE you can write Facebook there.
Example:
http://www.grazitti.com/resources/webinars/5-must-have-features-for-your-service-cloud-implementation.html?utm_source=Twitter&utm_medium=Webinar_Tweet&utm_term=Service_Cloud&utm_campaign=Social
Hope this Works :)
You always able to find your refferal traffic under > Acquisition > referral even you tagged link with utm.
If it's not help, please upload some screenshot.

Double action links

I am building business websites for multiple clients and I would like to be able to create links that do two things at once. Specifically, when visitors click an image on the website, in addition to going to the location the link specifies, I would also like to send a pre-determined text to the business owner's cell phone. Is this possible.
It is indeed possible. You'll need to call a php file with two parameters. One parameter should be the link where the user should be redirected, the other parameter would need to be the message you want to send to the owner.
i.e. your link would need to look like this:
link text or image
Then you need to prepare your php to get these parameters. First you need to send the text message, (tutorial for this can be found on this link: http://davidwalsh.name/send-text-message , and after the message is sent you need to redirect to the link you've got from the parameter. In php, you can read the above sent parameters like
$redirectlink = $_GET['url];
$message = $_GET['message'];
I hope this helps you resolve your issue.

Why is a number in my link text appearing as *************** (stars)?

I have posted this as, although I worked out the answer, I could not find anything about it in a Google/stackoverflow search. I hope it might help someone in the future.
My C# MVC app generates a link and emails it to the user. In the email the html is simply a link tag with the url used as the href and the link text.
In the email in Outlook the link displays as below:
http://mydomain.com/Foo/Bar?id=6***************
When you hover over the link it shows as
http://mydomain.com/Foo/Bar?id=6523054102058710
The numbers should always show, otherwise the user may be suspicious.
It turns out that the number I was generating was 16 digits, inadvertently the same as a credit/debit card number. This meant that some email clients were hiding the number to protect privacy.
To solve the problem I simply changed the number of digits.

Resources