ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Automated Google shopping products.txt generation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Automated Google shopping products.txt generation

 Post Reply Post Reply Page  <12
Author
Message
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Posted: 08-March-2011 at 3:03pm
So,

Apparently scheduling stuff on a Windows server is quite a bit trickier than setting up a cron job with Linux. Plus, a script should "just work", not require a bunch of configuration. With that in mind, I'm looking to set up a "fake schedule" for this script by including a small snippet into my AdminHeader.asp file. I'm also considering putting this snippet in menu.asp instead. We'll see. Anyways here's the code:


'// Automated Google Products Submission
If DateDiff("d", Application("LastScheduledRunD"), Now()) > 0 Then
    ' This is where you put the commands you want to run on the
    ' schedule set up by the above condition.
    Application.Lock
    Application("LastScheduledRunD") = Now()
    Application.UnLock     
     Response.Redirect("exportFroogleAuto.asp")

End If
'// END Automated Google Products Submission


Now, what I'd like to put at the bottom of exportFroogleAuto.asp is a redirect to take you back to where you were. I figured:

Response.Redirect(Request.ServerVariables("HTTP_REFERER"))

Would do the trick, but unfortunately it doesn't. It looks like HTTP_REFERER is not set when a page is redirected to with response.redirect. So, I figured I would simply redirect it to menu.asp. However, for some reason none of my response.redirect calls are working on this script.

Does anyone know how I can get this exportFroogleAuto.asp script to redirect you to menu.asp after it's generated the .txt file?

*Edit*

This is where I found the great advice for scheduling ASP files:
http://www.asp101.com/articles/john/schedule/default.asp

Edited by Brett - 08-March-2011 at 3:06pm
Back to Top
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Posted: 01-April-2011 at 2:23pm
If anyone was still interested in this, I finally got around to finishing it. Use this file to overwrite your Menu.asp (MAKE SURE YOU BACKUP FIRST - or just run a file comparison program to see what changes were made on menu.asp) Then, upload the other file into the same location as your menu.asp file (pcadmin/) You'll need to edit exportFroogleAuto.asp and configure the variables at the top of the file.

Once it's setup, the first admin to log in each day (the first person to view menu.asp) will trigger exportFroogleAuto.asp and the new feed will be generated. A message will be displayed on Menu.asp notifying that the feed was generated, and a link is provided so you can double check the new feed if you'd like to.

I've been using it on my site for the past week or so, and it appears to be updating the feed daily. New products are being added to our Google Product Search listing without me having to manually generate the feed.

*edit*

Whoops, forgot the files...

AutoGenGPF.zip

Edited by Brett - 01-April-2011 at 2:25pm
Back to Top
whizzinpc View Drop Down
Newbie
Newbie
Avatar

Joined: 17-January-2006
Location: California
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote whizzinpc Quote  Post ReplyReply Direct Link To This Post Posted: 07-April-2011 at 6:15pm
Very Nice! A couple of suggestions. It would be helpful if it created the canonical url. Also, have input fields to add google tracking code.
&utm_source=user input
&utm_medium=user input
&utm_campaign=user input
&utm_term=user input or sku

Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 07-April-2011 at 6:37pm

Art - on that point, we did something interesting for a client recently.

They are adding querystring variables to their PPC placement in the form of
 
domain.com/store/pc/somepage.asp?keyword=xxxxx&source&yyyyy
 
We capture those keyword and source values upon arrival to the site, store them along with the order, and then we provided a report/export module at the back end for analysis.
 
This code could be bundled up for anyone who had such an interest.
 
Back to Top
whizzinpc View Drop Down
Newbie
Newbie
Avatar

Joined: 17-January-2006
Location: California
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote whizzinpc Quote  Post ReplyReply Direct Link To This Post Posted: 08-April-2011 at 12:46pm
If I understood correctly... the order will show what campaign it came from directly in the control panel order details rather than having to check google analytics. I can see how this would be useful.
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 08-April-2011 at 1:38pm
yes, we show the source of the sale (when it came from a PPC campaign) in the order admin AS WELL AS providing an export tool so you can develop internal reporting of metrics.
Back to Top
whizzinpc View Drop Down
Newbie
Newbie
Avatar

Joined: 17-January-2006
Location: California
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote whizzinpc Quote  Post ReplyReply Direct Link To This Post Posted: 08-April-2011 at 1:51pm
We could definitely use that.
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 08-April-2011 at 2:02pm
Give me a call.  The code is in a 4.04 store with other mods so we just need to carve out these pieces and move them to whatever version you are running.
Back to Top
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Posted: 10-April-2011 at 4:38pm
Originally posted by whizzinpc whizzinpc wrote:

Very Nice! A couple of suggestions. It would be helpful if it created the canonical url. Also, have input fields to add google tracking code. &utm_source=user input&utm_medium=user input&utm_campaign=user input&utm_term=user input or sku


I'll see if I can get some time to incorporate these into it. Where would the google tracking code be added? On a per-product basis or one for the entire feed?

Back to Top
whizzinpc View Drop Down
Newbie
Newbie
Avatar

Joined: 17-January-2006
Location: California
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote whizzinpc Quote  Post ReplyReply Direct Link To This Post Posted: 11-April-2011 at 1:59am
It would be per feed.
A text input field for each
utm_source=
utm_medium=
utm_campaign=
and
utm_term=
for utm_term it can just be the sku of the product. So this one would be automatic.


Example:
http://www.abc.com/productcart/pc/red-widget-p312.htm?utm_source=google-base&utm_medium=CPC&utm_campaign=Google-Feeds&utm_term=red-widget
Back to Top
 Post Reply Post Reply Page  <12
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.