Creating an anonymous link - html

I was wondering how I would be able to create an anonymous link (blanking the referrer) for redirection (so they are not 100% aware of where the client came from).
So for example, user visits mydomain.com/product/2/ and wants to be redirected to the cheapest offer out there othersite.com/product/aiwdkaDOW important here is that the 'othersite' has to see this request as an manual input (so it looks like that the client wrote the url down in the URL bar).
Actually I just like to create the same effect Linkonym has
Thanks in advanced.

Anonymizing a link seems a little more complex to me (due to the fact that you don't want the target link to know that the traffic came from you) but as I expected, there are APIs and even This GitHub project that might interest you.

Related

Analytics Filter to attribute a specific landing page to a certain referrer?

our business advertises on the classifieds website www.kijiji.ca, and as part of that they have a link back to our website on all of our advertisements. In what looks to be an effort to prevent tab-nabbing, kijiji recently added rel="nofollow noopener noreferrer" to their 'referral' links. This had the unfortunate side-effect of breaking analytics for me, and any other person who advertises on kijiji.
I've taken this up with Kijiji, but as I suspect it's a security concern on their part I doubt they'll be open to changing it. They are currently investigating the issue.
At the same time as the original change, they forced '/referral=kijiji' to the end of any URL passed into their website link field. So, my question is if anyone knows of a way to configure a filter in analytics which sees that url and causes the hit to be attributed as a referral.
Of course, as a work around you can just go into the Landing Pages report and search for '/refferal=kijiji', but that breaks reporting and causes your Mediums/Sources reporting to falsely attribute referrals as direct traffic.
If anyone has a workaround I'd be very grateful! Thanks for reading.
As far as I'm aware, there isn't a way to set a referrer after the data has been collected by GA as raw GA data is not modifiable. You could send a virtual pageview with a utm parameter for attribution purposes. Keep in mind that this will inflate your pageviews count and will also consider the session to be a non-bounce.
If it were me, I'd fire an event when I detected '/referral=kijiji' in the URL and then create a segment of sessions that included the event. Be sure to use a non-interaction event so that your bounce rate isn't affected.

Post to Node.js Server from Within HTML e-mail

I am writing a simple mailing application, however I am not yet aware of the full capabilities of HTML editing within the mailing world.
I would like to give the website administrator the choice to accept or to refuse a reservation by sending him an overview of the reservation. Below in the mail I had 2 buttons in mind, accept & refuse.
I tried using a form within the HTML e-mail but almost every mailing client blocks this out.
Is there another method to do a http post command to let's say myserver.com/accept or myserver.com/refuse from within an e-mail without having to open an additional webpage?
If not, what is the best way to achieve such things?
This is a pretty relevant article: https://www.sitepoint.com/forms-in-email/
Basically he concludes that support is not reliable so you should not use forms in emails which I agree with.
Since you say you want to give this choice to a website administrator I think you probably want some sort of authentication. So I could see it working something like this...
Send the admin an email containing two links mysite.com/reservations/:reservation_id/accept and mysite.com/reservations/:reservation_id/refuse.
Admin clicks on one of the links
Link opens in the browser and your site(controller -> ReservationService) accepts or refuses based on the id and action in the url
You will have a few things to consider, such as authentication(I assume you already have this since you have the notion of website admin?), authorization(can this admin accept or deny the reservation?), does the reservation exist, has the admin already accepted or denied the reservation, etc.

Security of GAS for G-sites?

I want to create a script that runs on a Google site. The script would perform a specialized calculation for a given user and then display the answer for the user. The script would depend upon user input, but the code itself should not be viewable by the user. I want the code to exist in a "black box" so that the calculation formula can be kept secret. Is this possible?
I searched the documentation, but only found this, which does not address this question:
https://developers.google.com/apps-script/guides/services/authorization#permissions_and_types_of_scripts
Whether your App script is embedded in a site or written as a standalone script does not change a lot of things... the only difference will be the way you include it on a page as a gadget.
If it is embedded it will be available from a list of scripts in the page editing, if not you'll have to use the .exec url of the deployed webapp.
Anyway, that does not change the way people will have access to the app.
You can define these parameter when you deploy the app (which is mandatory in both cases), allowing for anonymous access or requiring to be logged in.
If I understood you correctly, you would like to restrict the access to some people but not share the code.
Depending on how you defined the access mode above and wether you are using a Google Apps inside a domain or not, you will be able to do it using 2 ways :
in a domain you can get the logged user identity and use that to accept/deny showing the app.
in a "normal" gmail account you will have to implement some sort of logging feature to request a user name and password to give access to the active part of the app.
In both case you never need to share the script itself, this sharing parameter is independent from the webapp access.
I hope I understood your question correctly... if not, feel free to comment.
You might check out the Private Functions section of the following page.....the example is similar to what you're referring to, I think.
https://developers.google.com/apps-script/guides/html/communication?hl=ru
I don't fully understand how they work and haven't used them myself, but I bookmarked it to figure out later. Maybe another user who understands Private Functions better can explain...

Force start page or single entry point

I have a web application that I want to force users to log in before they can get to any other pages. I have set up the login and it is working but I can't figure out how to stop them from by passing the login on subsequent visits.
for example they save a link to main.html so I haven't authenticated them. Ideas??
thanks John
For authentication purposes, you should never really on client-side validation only.
Client-side, there's not really much you can do, as the user could just go in and change your code.
The correct way to handle this, is a server-side check (using PHP, ASP.NET, ...) combined with setting a cookie
Please let us know which technology you are using on the server-side (if any)

How to prevent crawlers from following links?

I'm building a site that will allow sellers to:
list their products on my site
have each product link back to the seller's site
be charged for each link clicked
What I need to do now is to somehow make sure that I am only logging actual human users following the links to the sellers site. If it's a bot crawling the site, I shouldn't be charging the sellers for that.
Is there a way for me tell bots not to follow a certain link? I don't think it's nofollow as that is not intended to block access to content.
The way to tell a bot not to follow a link is precisely to add rel=nofollow to your <a> tag.
Assuming you are also logging locally before forwarding to the external url you could also check the user agent string.
In fact, if you are going to ask people to pay based on number of referrals it might be an idea to log IP address and user agent against each paid for click in case your stats are ever questioned.
You just add a [robots.txt] file, e.g. like this one.
You can find more info about [robots.txt] files on the net, e.g. in Wikipedia.
Typicall you can identify them by the user agent string. You can find a list here, can't say it's perferct, but it's a good base to extend: PHP/MySQL - an array filter for bots
Robots.txt is another way, more about it here