[ic] Track Product Views

Michael Goldfarb interchange-users@icdevgroup.org
Fri Sep 6 11:26:18 2002


> >This may be in a manual somewhere but, how can I track which products
> have
> >been viewed and also which products have been placed in the cart.
>
> >We seem to be getting products viewed and not purchased so
> we need to
> >assess
> >what the customers are actually interested in so we can market better
> too
> >them. i.e. We may have wrong products on Special.
_______________________________________
>
> We did this for one of our clients by adding a column to the products
> table and then running a sql query on flypage.
>
> We added a column labeled "number_accessed" and then placed the
> following query on flypage.
>
> [query st=db sql="update products
> set number_accessed = '[calc][item-field number_accessed] + 1[/calc]'
> where sku = '[item-code]'
> "]
> [/query]
>
> I don't know if this is the best way to handle it, but it
> works well for
> what our client needed.
>
>Thanks Michael

>After months of using IC I am amazed at how little I really know about
the
>package.

>When is Flypage accessed and therefore is this query counting products
>viewed or placed in carts.  Actually I'm guessong it is viewed.  I just
had
>an idea! I could store date last accessed also via the same method
which
>would allow greater reporting power.

>If I was correct about product view then maybe similar code placed on
the
>'Buy Now' would probably work for "in cart".

>Regards
>_______________________________________
>Andrew Rich
>Maps Downunder
>Ph: +61 3 9748 0422 Fax: +61 3 9748 0422
><mailto:andrew@mapsdownunder.com.au>
><http://www.mapsdownunder.com.au>


It really depends on how you have your catalog setup. If you are using
something similar to Foundation, flypage is called when someone clicks
on one of the individual products (not when someone runs a
keyword/category search). For instance on the Live Demo, this is an
example of flypage:
http://demo.interchange.redhat.com/cgi-bin/ic3/os28074.html

Yes, you could store date last accessed by adjusting the query and
adding another column to the products table.

We have done it using something like (assuming a column name of
"last_accessed"):

[query st=db sql="update products
set number_accessed = '[calc][item-field number_accessed] + 1[/calc]',
last_accessed = '[convert-date raw=1][/convert-date]'
where sku = '[item-code]'
"]
[/query]

You could run a similar query on the cart page to see which items have
been placed in the cart, but you would obviously need an additional
column.