Anatomy of a Porch.com SMS lead alert - hyperlink

I would like to design the SMS referral link for a lead alerts application. (So the pro would receive the SMS message on their device with a link to click through to the job request details.) I'd like to make it secure and scalable. The link below arrives in the SMS as a shortened URL. That much I understand.
Porch.com does something similar and I'd like to know what the strategy is behind each segment in the URL (or your best estimation). Can someone help me understand?
Here is an example: (Thanks Porch.com)
https://porch.com/pro/project/3fd55669-d7cf-4655-892e-252080c34a79?c=50145918&email=12345#yahoo.com&referrerSource=sms

Twilio developer evangelist here.
First of all, this isn't really a question for Stack Overflow. This is a place for asking questions about code that doesn't work in order to get it to work.
Having said that, the more I looked at the URL as I was commenting on this question, the more I feel I worked out. This is my idea of what the URL is saying.
Here's the URL again: https://porch.com/pro/project/3fd55669-d7cf-4655-892e-252080c34a79?c=50145918&email=12345#yahoo.com&referrerSource=sms
The random string in the URL, 3fd55669-d7cf-4655-892e-252080c34a79, looks like it is the identifier for the project itself. It's long and random, like a uuid, so it would be hard to guess, but can uniquely identify the project.
The email is presumably the email address of the pro that the SMS was sent to, so that the return on sending SMS projects to them can be measured.
The referrerSource is then used to measure how each of their referring sources is performing.
The only parameter that is impossible to really guess at is the c. Removing it (in fact, removing any or all of the query parameters) didn't change the result of loading the page. This implies that it is just another tracking parameter.
Hope that helps.

Related

iOS - How to find/debug a system function in contacts app

The title might be weird but I try my best to explain my concern.
Upfront: I have little knowledge in programming but I'm willing to learn and understand this whole topic.
I would like to know how I can get an inside look into a function of Apples "Contacts" App or better a function this app provides.
E.G: If you enter a new contact with mobile phone number or email address and you save the inputs, the contacts app automatically responds if this user is able to receive Facetime calls. A new slider appears like a dropdown and you can chose to call via Facetime.
My approach is to have a script where I can enter the number/email and to get a response if Facetime is available or not.
I'm not asking for someone to give my a code example or something. I'm just interested how to approach this task. I would appreaciate if someone can give my a hint in the right direction.
Thank you.

Emails sent to Apple devices sometimes have broken links [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
My company sends out various newsletters (all double opt-in and CAN-SPAM compliant of course) and we're having an issue with Apple devices. All of the links in the emails become corrupted in nearly the same way, but all other code/content remains untouched. Here is some key information:
So far we've only seen this on Apple products (iPads, iPhones)
Not every user on the same device has the issue (Our two company iPads don't get it, but users with iPads have reported it, so it may have to do with the iOS version)
For users which the issue it affects, it doesn't affect every newsletter they receive. Also, either all the links work or all the links are corrupted; never a mix.
The newsletters are built automatically by pulling articles from our various websites and inserting them into a template
The issue happens regardless of the email service/client being used. Eg: from an iPad using a gmail account via the gmail app or via gmail.com in a browser.
If the user accesses the same email using a non Apple products, the links are not corrupted.
If the user forwards the corrupted email to someone who accesses it via a non Apple device, the corruption remains.
Here is a sample of how the URL changes:
correct:
http://www.example.com/path/link.php?M=5009308&N=21109&L=34170&F=H
corrupted:
http://www.example.com/path/link.php?MQ80105&N!109&L4170&F=H
correct:
http://www.example.com/path/link.php?M=5009308&N=21109&L=34087&F=H
corrupted:
http://www.example.com/path/link.php?MQ80105&N!109&L4087&F=H
correct:
http://www.example.com/path/link.php?M=5009308&N=21109&L=34137&F=H
corrupted:
http://www.example.com/path/link.php?MQ80105&N!109&L4137&F=H
All of the links on all newsletters follow the exact same pattern. The only difference between newsletters and links would be the numbers for the query variables (M, N, and L).
It only affects the query part of the URL
It seems to center around the "=" sign on each URL when it's followed by a number:
"=5009308" became "Q80105"
"=21109" became "!109"
"=34137" became "4137"
Part of it seems like it's a character encoding issue but you'd think it would affect more than just the query part of links (ie, you'd see text in other parts of the HTML/content changed also).
Does anyone have any idea what could be causing this extremely strange bug? Any help or ideas would be greatly appreciated!
At least part of it is caused by something between your mail server and their device deciding that you're using quoted printable encoding and "fixing" it. That would account for =21 being replaced by ! and for =34 being replaced by 4. I don't know what triggers this but based on your description I would suspect that something in your outgoing email headers is telling the device it needs to do this. If your URLs always contain = but are only corrupted some of the time, your headers may be inconsistent. If the URLs only contain = some of the time and are corrupted every time they do, then the issue is always there but only visible with the right data.
Try your original URLs at the online quoted printable decoder, you'll get exactly the same changes.

Does google ever use guesses to find webpages?

If I have a webpage (www.example.com/very_long_random_name.htm) on a site that's already been indexed by google, will it ever be found if it has no incoming links?
Or can google find such unlinked pages by some other method?
No, it will not be indexed. At least in theory, that is. The crucial thing is that there are no incoming links, the fact that the name is long and random does not matter.
However, it is hard to be sure that it really won't be indexed, since incoming links can come from everywhere and without your knowledge. For example some email that contains a link might get indexed (especially if one particicpant in the conversation uses a questionnable mail provider), or someone might post a link on some forum, etc.

Any short URL service that you can POST variables on?

I work for a small SMS marketing company, where we're sending out text message that each contain a unique code for the user (as a variable). My url is rather long, and I want to attach a unique variable for each one.
For example, the full URL might be:
http://www.mybigwebsiteurlishuge.com/more/more/?code={variable}
but I want it to be something like:
http://bit.ly/2398h?code={variable}
Anybody know any services that can do this? Otherwise I need to purchase small domain name just for this.
Thanks so much!
Most shortening services have APIs that you can use to shorten your URLs. Including bit.ly. Yu will have to use their API to the shortened URL.
I kept on looking, and still couldn't find anything suitable, so I got a new 3-character domain name, and also make a redirecting script that changed miniaturized variable names t the full ones. This works just as good really.

Twitter API: how to know what application was used to follow

In the email notification we can see something like
<username> followed you using <appname>.
It is great. But is there any possible way to know the application name using API?
I took a look through the REST API, and I could not find anything that would support this. My guess is that this is a twitter.com feature that is available in the API (yet).
The most logical places I looked were statuses/followers and friendships/show. In both cases there was nothing definitive. Checking the follower emails for my account, I found multiple followers that used applications (like PeopleBrowr and SocialOomph) to follow the account. In most cases, the source on their latest status object matched the application name used to follow me, but that was definitely not a sure thing.
So, to answer your question directly, no I don't think it can be done through the API (not unless there's an undocumented method out there that does this.)
I can, however, think of a way to get that info. One approach would be to set up the email account receiving the follow notifications to forward a copy to a mailbox that is checked by an automated process. When emails show up, parse them to find the app name used to follow you.
I used the following regular expression (in C#) to find the application's name and URI in the email's body:
Match m = Regex.Match(input, #"followed you using\s*<a[^""]+""(?<appUri>[^""]+)""[^>]+>(?<appName>\w*)</a>");
I used m.Groups["appName"].Value to pull out the application name, and m.Groups["appUri"].Value to pull out the URI from the match.
In order to tie the app info to a user, I had to also find the screen name with:
Match m = Regex.Match(user, #"\(#<a[^>]+>(?<screenName>\w*)</a>\) is now following");
I used m.Groups["screenName"].Value to extract the value from the match.

Resources