inboundnow / retired-leads

Track visitor activity, capture and manage incoming leads, and send collected emails to your email service provider for WordPress
http://www.inboundnow.com/leads/
11 stars 3 forks source link

Cleaning automatic meta pair creations on non applicable post types #10

Closed atwellpub closed 11 years ago

atwellpub commented 11 years ago

Heya

These meta pair keys get auto-created for custom post types:

lp_page_conversions_count lp_page_views_count wp_cta_content_placement wp_cta_page_conversions_count wp_cta_page_views_count

DavidWells commented 11 years ago

These come from the lead storage ajax I think.

wp_cta_content_placement is for CTA placement though.

wp_cta_page_views_count and the lp version run from the page_view_tracking.js script but should only be on there respective custom post types.

I thought I updated this. Is this happening on brand new pages?

atwellpub commented 11 years ago

It's happening on brand new lead lists being created on my local install. Not sure about the other cpts but I'm believing they will be there too.

DavidWells commented 11 years ago

https://github.com/inboundnow/landing-pages/blob/master/js/page_view_track.js runs the ajax call lp_record_impression which creates lp_page_views_count but it's only enqueued on landing pages: https://github.com/inboundnow/landing-pages/blob/master/functions/functions.global.php#L41

Not sure why that meta would be running on admin pages unless the page_view_track.js is present

atwellpub commented 11 years ago

I just created a new list and this was the only stray:

wp_cta_content_placement

DavidWells commented 11 years ago

I just found the thing. Its saving empty instead of deleting itself if not set. Will update

DavidWells commented 11 years ago

done https://github.com/inboundnow/cta/commit/2e1b54c6e7d1fd4cea4f2e676b43c2c31b5540c9