How to show someone came from a link on my website? - referrer

It must be the full url, not just history or type. I have seen, on statcounter.com, where they show stats regarding where the referrer of our site came from. I want to show the exact link like statcounter shows under a tab.
Does anyone know how to do this?

You will want to use Google Analytics.
Google will generate a unique javascript code for you, you then paste it in your html, which activates the service. It's very easy to get started and the dashboard is very robust considering it's free. To get started, you can check this out: http://www.google.com/analytics/learn/setupchecklist.html

Related

How to get github edit history of issue and issue comments via api?

I only found api to get issue list, issue content, issue comments list and content, no issue content edit history, no issue comments edit history.
No, this cannot currently be done purely from the API.
However, if we reverse engineer the way GitHub loads past edits in the web interface, and do a bit of scraping, we can accomplish the same thing without the API. Unfortunately, this means that we don't have the reliability of an API - GitHub's web interface is liable to change at any time, breaking our code. But it's better than nothing!
So, first we need a log of all the edits for a comment. Let's do this with the comment https://github.com/seisvelas/crypsee/issues/1#issue-874033952 (from a test repo provided by the gentleman who set the bounty on this question). On order to get a log of this issue's comments, we will need to base64 encode the issue number with '05:' then the word 'Issue' at the beginning. Why '05:'? I have no idea. But it's always there and it won't work with out it. So we'll be base64 encoding the string "05:Issue874033952", which gives us MDU6SXNzdWU4NzQwMzM5NTI=
Great, now we insert MDU6SXNzdWU4NzQwMzM5NTI= into this URL scheme: https://github.com/_render_node/{BASE64 ENCODING HERE}/comments/comment_edit_history_log, resulting in a link to https://github.com/_render_node/MDU6SXNzdWU4NzQwMzM5NTI=/comments/comment_edit_history_log
Following that link, we see an edit history, but not the contents of the edits themselves:
However, this gives us the information we need! If we look at the HTML, we see that all edits prior to the current edit are defined as buttons with a link to that edit:
<button
type="button"
class="btn-link dropdown-item p-2"
role="menuitem"
data-edit-history-url="/user_content_edits/MDE1OlVzZXJDb250ZW50RWRpdElzc3VlRWRpdDo1MzIxODcxNzE="
>
The URL pointed to by the data-edit-history-url is the same URL loaded via the browser's networking tab when clicking to view a past edit in the web interface!
Unfortunately, if you attempt to view that page on it's own, you get a 404. It is intended to be viewed only from the web interface. But that's no problem, just go to the web interface, view one of the edits, and copy the headers it sends along. In my case I'm using Chromium, so I just find the request to the edit in my networking tab, right click and hit 'copy as Fetch request (nodejs)' and viola, with those headers I'm good to go!
For example, for the comment we've been using this whole time, I make that request and get back a bunch of HTML. The content of the original edit is near the end:
<ins><p class="rich-diff-level-zero">before edit</p></ins>
There it is! I could write a script to automate this, but then I'd be doing everything for you :3 Suffice it to say that with a day's work of cleverly organized scraping, this is roughly what you must to in order to view these revisions. If someone does make such a tool, the OSINT community will surely be immensely grateful!
To see the features of github api, it is better to read the following link
The best source to get the answer:
https://docs.github.com/en/rest/reference/issues
Check the issues you mentioned, ie issue comments, edit history issue, etc. in the link above
As far as I saw it is possible to receive issue comments but I did not see a section for edit history issue
I also suggest you see the following links for the edit history issue:
https://github.com/isaacs/github/issues/954

Google I'm Feeling Lucky URL

So, I've spent about 2 hours trying to get the I'm Feeling Lucky URL to work. It seems the URL doesn't like the periods in the search parameter, so does anyone have any potential tricks?
Search Value= 40.840.1/8Z
The first result in a regular Google search is the correct page.
Here's what I've tried:
http://www.google.com/search?btnI=I&q=40.840.1/8Z
http://www.google.com/search?btnI=I&q=40.840.1%2F8Z
http://www.google.com/search?btnI=I&q=40%2E840%2E1/8Z
http://www.google.com/search?btnI=I&q=40%2E840%2E1%2F8Z
http://www.google.com/search?btnI=I&q=40%2F840%2F1%2F8Z
(That one was actually pretty close)
http://www.google.com/search?btnI=I&q=40%20840%201%208Z
And all of the above surrounded in quotes (%22)
The problem is that the I'm Feeling Lucky aspect doesn't work. It finds the correct results, it just doesn't navigate to the first result. I'm open to alternatives besides the I'm Feeling Lucky URL parameters as well.
I'm trying to implement this into a .NET application that provides employees with resource information, which is best received from the manufacturer's website(s). The trick is that the resources are from many different suppliers and the links need to be somewhat automatic. Basically I don't whomever manages the software to update these links. To navigate, I'm simply using the Process.Start("http://www.example.com/") command which uses the default browser to navigate to the address.
This post helped a lot by the way.
I wasn't able to get any closer than your closest one.
But if it helps, here's an alternative way of writing the "I'm feeling lucky" URL.
http://google.com/search?q=haimer+usa+40%2F840%2F1%2F8Z&btnI
What I did to find the right url is to navigate to google.com. After this I turned my internet connection off. I entered the search details and pressed submit. You can now see the url in the address bar, but it doesn't redirect you to the first result. You can now copy the url and see how google treats your dots and other weird characters.
So to recap:
Go to google.com
Turn your internet connection off
Enter search term
Press 'I'm feeling lucky'
Copy the url from the address bar
You can create a google custom search engine of your own, and either exclude certain sites or include specific sites only, use http://cse.google.com to do this.
There is a SO tag for google custom search

Is there anyway to get this table data into iOS app?

I work with a company who outsources their website. I'm trying to retrieve data from the site without having to contact those who run it directly. The table data I'm trying to retrieve can be found here:
http://pointstreak.com/prostats/scoringleaders.html?leagueid=49&seasonid=5967
My methodology thus far has been to use google chrome's Developer Tools to find the source page, but when I filter under the network tab for XHL, only the info of the current games can be found. Is there anyway to scrape this data (I have no idea how to do that; any resources or direction would be appreciated) or another way to get it? Am I missing it in the developer tools?
If I had to contact those who run the website, what exactly should I ask for? I'm trying to get JSON data that I can easily turn into my own UITableViewController.
Thank you.
Just load the page source and parse the html.
Depending on your usage there may well be a copyright issue, the page has an explicit copyright notice so you will need to obtain explicit permission for your use.

Google Custom Search API curl trouble

I'm a newbie at stackoverflow so please be patient with me :)
I'm trying to get access with the Google Custom Search API.
But I get return that I can't understand.
My query is like this:
https://www.googleapis.com/customsearch/v1?&key=********&q=red%2Bsox&cx=**********&start=0&num=10&cr=countryCA&lr=lang_fr&client=google-csbe&output=xml_no_dtd
And the result I get is this?
string '{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Value"}],"code": 400,"message": "Invalid Value"}}' (length=172)
What am I doing wrong?
I want the result from Google to appear.
Thanks in advance :)
You don't have a cx.
Take a look at this answer
What happens is because this api is used mostly for adding a search option
for your site you have to specify you custom search engine (e.g. search only your site).
When you want this to search the web by code you need to do the above. Add a fake
site (where you would add your search textbox), configure it (search the web, or your site, or whatever else) and then delete the fake site
Update
Oh god, i just saw that. Sorry. Well the problem is that you start with 0. Valid is 1. Change start=0 with start=1 and i think you would be good to go. Take a look at this for valid values for the start parameter official page

Search Engine Optomisation

My neighbour popped over last night to ask me for help with regards to his company's website. He said that it used to be ranked pretty high on Google but has since fallen off completely.
Now, I'm a Windows App programmer hence my request for help. I took a look and there the meta tags seem ok. I recommended that he add a <h1>heading</h1> to the pages with a page title to help reinforce the content.
I also suggested that finding related websites and getting them to link to his site was good for search ranking.
Are there any other general strategies / tools that could help?
He site is: http://www.colofinder.co.uk/
ps. BTW: this isn't just an attempt to have StackOverflow link to my neighbour's site - I'm aware that links from SO don't add to its ranking.
Go to http://ooyes.net/blog/a-step-by-step-15-minute-seo-audit-%28a-sample-from-seo-secrets%29 and read it. Then go to http://www.searchenginejournal.com/55-quick-seo-tips-even-your-mother-would-love/6760/ and read it. Then go to your friends site and look at it with that information in mind. Off the top of my head, I would add flip the company name and page title in the "title" tags. Look at the google analytics account and see how people are coming to the site. That will give you an idea of where you should start your efforts to build a workable base.
First of all he needs to be make sure that his website contents are well managed and to the point. Then Page title has to be pin point, meta tags are obsolete so try meta description. Then Main Heading should be under h1 tag, sub heading under h2 and further sub heading h3. Try to update your website one in a month.
Use community websites like Facebook, Twitter and linkidin and other related forums for posting updates about completed projects and must give inbound links. You can use your company name as an inlink to your primary website and project name as an inlink of subpage of your company website.
Keep on posting at least once in a week. Post website URL to online directories will be a great help. Do not use Blackhat SEO techniques like cloaking. Do not use any invisible text/div in your website. Make sure that whenever you give your website link any where, give the most to the point and appropriate link.
Your link should have to have that stuff against you are posting your link/sublink. Make a section on your website for tag clouds/google tags, this will be a great attraction for search engines and they will link your website to other popular websites.
Make sure these tags should be directed to top ranking website which should have relevant material. I hope this will help. Feel free if you have trouble to understand anything i have mentioned above. Best of Luck