How to expire a webpage after certain period of time; and how does it affects in the Google's Indexation? - asp.net

I have a question about multi-vendor e-commerce portal.
Sellers offer particular offer for a time-being. For each offers, a new webpages are created, they are listed in site-map and crawled by Google.
My client doesn't want to show those pages once the offer is expired. So how to setup an auto-expiration of those web-pages? I am looking for the methods for asp.net technology. Can I achieve it using HTTP header, or do I need to do something with database and server query?
Once those pages are expired, then should I remove from sitemap? How does that affect in Google's indexation? Are those pages show up under 404 errors in Google Search Console? If yes, then after a few months, there will be a long list under 404 errors.

I think so that it's a valid concern for all e-commerce store who provide such offers.
What I would recommend is to create a single page for your offer and post all your offers on that page which would redirect to that particular page and once the offer has expired then remove it from that main offer page and to some extent it would resolve your indexing issue too.
Hope so that it would help you out.
If you still have any concern please feel free to ask.

One of the methods to do this, is to add an expiration date for each web-page and expire those pages after that date.

Related

Wordpress REST API Fetch = Tracking?

I have some question I didn't find an anwser in the internet. I'm buildung an app and therefore I use my Wordpress Website to receive Data with the REST API and JSON. Now I need to now if there is any tracking, when I fetch the data from my site. Because there is a request to my site so I think something has to be tracked or?
Because of the Tracking Policy.
Hope, anybody knows it!
Thx, Eric
I search many websites and read about the REST API of Wordpress but couldn't found an answer.

Blocking Spam referral traffic - better to redirect or throw up a 403 error?

I'm testing out a plugin on a Wordpress site to prevent referral traffic. The default setting is a redirect to google.com. I can override this and display a 403 error instead.
Do you see any advantage with one over the other?
From what I have read when researching how to deal with this issue, most of the referral 'spam' you are getting in google analytics doesn't actually come from hits to your site, but instead it is done by spammers exploiting google's analytics code, by using random tracking IDs, and they up end up using your ID too.
Having said that, I don't think a wordpress plugin can do anything to prevent that kind of spam as they don't ever reach your site, and I believe the vast majority of referral/analytics spam being done currently is using the method mentioned above.
So the best way to get rid (or at least largely reduce the amount) of referral spam you're getting is to set filters within your google analytics dashboard. Even the methods for that are constantly changing, as google keeps improving that service, but here's two fairly recent articles that may help you configure those:
https://www.distilled.net/resources/quick-fix-for-referral-spam-in-google-analytics/
http://www.shivarweb.com/4635/filter-analytics-spam/

Is there any way to publicly request 'Page Views' of any website URL from Google Analytics?

I am not sure if this is possible, nor that I could find any leads yet.
I want to be able to return only the total 'Page Views' number of any website URL, that uses Google Analytics. With GA API, I can use this by logging-in but only for the limited websites I am authorized to see the stats.
However, I only need to display total page views for requested page URL (not entire domain & no information is stored on the server.
Is there any way we can achieve this?
EDIT:
After answers from Tom & Blexy -- I would like to rephrase it.
What're the best ways to estimate page views of any URL example.com/this-is-url, from single/multiple sources, like Alexa?
TIA :)
I think you're asking if there's any way to see GA data for other sites - say, stackoverflow.com. If so, then no, there is no way to access GA reporting for sites your Google account does not have access to.
Take a look at Google Analytics superProxy. It will require some setup, but I believe it's one of the only ways to publish your data publicly without the use of a dashboard, etc.

Google Analytics posts monitoring addon for WordPress

I'm assigned to create a WordPress plugin that displays recent visits graph under each post in WordPress. I'm struggling with the authentication of the data and general structure of plugin. My first question would be whats the most efficient way to authenticate with Google API for this kind of task?
I was looking into the AuthSub but i cant understand the concept of next parameter in the query. It should be the landing page after authorization, but how can i make it work dynamically with all the different posts?
In OAuth i'm getting a bit lost in terminology.
Second question is how often should the Google API be queried for the results. I mean is it rational to make smaller request every time visitor opens a page or maybe its rater optimal to download the data for the pages once and keep it in local xml and refresh it on some intervals?
As an idea of the plugin overall structure i was thinking of making a php file which would generate the graph out of the GA feed and would do it so when called from post hook via ajax. This would be controlled by passing parameters of the post to that php file.
Would that structure make sense or there is an easier way to preform the task?
I would really appreciate if someone pointed me in right direction especially in authentication problem.
The most important thing to do first is to lay out your design. You don;t want the user of your site to authenticate on the GA API. Because he doesn't have access to your data. So you'll have to login with your own credentials on the backend. And just cache the metrics you want to display on the screen. So, from the user perspective, there's no way to tell if you're using Google Analytics or any other web analytics product.
Since you're working with Wordpress and you'll need to do the data pull on the backend you probably want to do that using PHP.
You should take a look at this PHP library.
http://code.google.com/p/gapi-google-analytics-php-interface/
Even though it's not google officially supported it's pretty good and you won't have to worry about the process of authentication.
It doesn't make sense to query GA every time the user visits your site. Besides impacting the load heavily the GA API has some latency and GA is not a real time tool. The data freshness on your GA data depends on how much data you get. If you are a small blog it can take 2-4 hours to process the data. If you're a big blog it can take up to 48h. So for that reason I'd query the API every 4 hours or so and just cache the data for all your pages. When you render the page it's just a matter of getting it from the cache/db.
To plot that data there are plenty of options around there. I'd suggest you to start with Google Chart Tools.

Google Chat in ASP.NET application

I want to provide chat facility to my website visitors. This should be same as google chat (person to person communication). Are there any free tools available to integrate in the website? Or is there any way that we can use Google Chat's API and can integrate in our website?
Pls help me.
You can embed google chat into your web page, instructions here
I think a reasonable approach would involve opening an iframe that talks to a dynamic page. The dynamic page would be auto-refreshed by two or more clients and continously post to/read from a table that stores the ID of the session, timestamp, user name(or IP), and message for the chats. The ID of the session would correspond to the dynamic page ID and bob's your uncle.
I'm sure there are various implementations floating around, but I'd want to control this on my own. No user accounts required if you set it up correctly, thought finding other users may be an issue without accounts.
There are a lot of good embeddable chat widgets you can insert into a page fairly easily that do all the work for you.
I've tried out a few of the ones listed in the link above (mostly MeeboMe and Geesee) and don't have any major complaints. With that many choices you should be able to find one that meets your needs. Most don't even require a login.

Resources