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
Advert Manager - Expiry date
-
- VIP Member
- Posts: 228
- Joined: Sun Feb 28, 2021 9:41 pm
- Has thanked: 1 time
- Been thanked: 5 times
-
- Lead Developer
- Posts: 2637
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 181 times
Re: Advert Manager - Expiry date
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.
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.
-
- Lead Developer
- Posts: 2423
- Joined: Tue Oct 29, 2019 9:37 am
- : Buy Me A Beverage
- Has thanked: 48 times
- Been thanked: 137 times
Re: Advert Manager - Expiry date
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.
Gamechanger Addon: Queued Emails, try before you buy.
-
- VIP Member
- Posts: 228
- Joined: Sun Feb 28, 2021 9:41 pm
- Has thanked: 1 time
- Been thanked: 5 times
Re: Advert Manager - Expiry date
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.
-
- Lead Developer
- Posts: 2637
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 181 times
Re: Advert Manager - Expiry date
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.
-
- VIP Member
- Posts: 228
- Joined: Sun Feb 28, 2021 9:41 pm
- Has thanked: 1 time
- Been thanked: 5 times
Re: Advert Manager - Expiry date
I finally got back round to sorting this out, I now have the admin below sorted for the box to appear.
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 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');