Page 1 of 1
Advert Manager - Expiry date
Posted: Mon Mar 22, 2021 2:20 pm
by LeeFoster
Afternoon,
Has anyone edited/modified the built in ad manager to have the adverts expire on a set date like the old banner manager used to do?
Also has anyone added the view/click count that used to be included too?
Thanks
Re: Advert Manager - Expiry date
Posted: Thu Mar 25, 2021 9:45 am
by LeeFoster
@burt @ecartz
Thoughts on how to add these features back in?
Re: Advert Manager - Expiry date
Posted: Thu Mar 25, 2021 10:11 am
by ecartz
I have nothing to do with the ad manager at this time and no opinion.
Of the certified developers, Rainer is the one who has mentioned the ad manager the most, so I guess he has some experience with it.
In general, I note that there is a facility for the expiration of specials. It's possible that something similar might be done with ads. But I haven't looked at it. It's also possible that it might be easier to wait until an ad is loaded or to add the expiration to the where clause.
For a view/click counter, you might consider doing direct log analysis. That's going to be more efficient than a SQL update like is done for products viewed. It's possible that Google Analytics might already have some provision for this.
Re: Advert Manager - Expiry date
Posted: Thu Mar 25, 2021 10:50 am
by burt
LeeFoster wrote: ↑Mon Mar 22, 2021 2:20 pm
Has anyone edited/modified the built in ad manager to have the adverts expire on a set date like the old banner manager used to do?
A couple of hooks would do it, no?
1 hook file with a few hooks (fires in the admin page) to add in the ability to add a cut off date and save it appropriately.
$OSCOM_Hooks->call('advert_manager', 'insertUpdateAction');
$OSCOM_Hooks->call('advert_manager', 'editForm');
$OSCOM_Hooks->call('advert_manager', 'newForm');
1 hook (probably fire admin page & shop side) to add in the ability to look at cut off dates and turn off ads.
$OSCOM_Hooks->call('advert_manager', 'preAction');
and somewhere in shopside (there are many to choose from), most likely system hook
As for counting, that's info I consider to be useless. These adverts are usually carouseled - which means (let's say you have 4), all 4 loaded, yet only 1 shows, it then swings to the next and so on. I would not bother.
Re: Advert Manager - Expiry date
Posted: Thu Mar 25, 2021 10:54 am
by LeeFoster
burt wrote: ↑Thu Mar 25, 2021 10:50 am
LeeFoster wrote: ↑Mon Mar 22, 2021 2:20 pm
Has anyone edited/modified the built in ad manager to have the adverts expire on a set date like the old banner manager used to do?
As for counting, that's info I consider to be useless. These adverts are usually carouseled - which means (let's say you have 4), all 4 loaded, yet only 1 shows, it then swings to the next and so on. I would not bother.
The reason behind this is so I can see which banners are working and which are not. I am happy to look at alternative options to track when these are clicked.
Re: Advert Manager - Expiry date
Posted: Thu Mar 25, 2021 11:15 am
by ecartz
LeeFoster wrote: ↑Thu Mar 25, 2021 10:54 am
The reason behind this is so I can see which banners are working and which are not. I am happy to look at alternative options to track when these are clicked.
I am sure that there are Google Analytics solutions for clicks. In particular: make a special page that is only linked from a particular ad. That page then redirects to the correct page. GA will count the number of visits to that page (assuming you include the GA code). So the banner would link to example_redirect.php and that page would redirect to
www.example.com
Slightly more complicated. Always link to a redirect page and let the redirect page pick where to redirect based on the ad ID. So the banner would link to ga_redirect.php?ad_id=4 and the page itself will figure out that ad_id 4 is supposed to go to
www.example.com
And if you have GA on both pages, I'm not even sure that you need the redirect. I think that it will simply report the travel. You only need the redirect if you need to differentiate between clicking two separate links on the page.
Re: Advert Manager - Expiry date
Posted: Wed Sep 22, 2021 7:03 am
by LeeFoster
I finally got back round to sorting this out, I now have the admin below sorted for the box to appear.
burt wrote: ↑Thu Mar 25, 2021 10:50 am
1 hook file with a few hooks (fires in the admin page) to add in the ability to add a cut off date and save it appropriately.
$OSCOM_Hooks->call('advert_manager', 'insertUpdateAction');
$OSCOM_Hooks->call('advert_manager', 'editForm');
$OSCOM_Hooks->call('advert_manager', 'newForm');
Now I just need to get the front end and the triggering of the status change in admin to sort.
burt wrote: ↑Thu Mar 25, 2021 10:50 am
1 hook (probably fire admin page & shop side) to add in the ability to look at cut off dates and turn off ads.
$OSCOM_Hooks->call('advert_manager', 'preAction');
and somewhere in shopside (there are many to choose from), most likely system hook