Code Monkey home page Code Monkey logo

ad-code-manager's People

Contributors

alexiskulash avatar carldanley avatar christianc1 avatar danielbachhuber avatar dependabot[bot] avatar dlh01 avatar garyjones avatar harvitronix avatar jblz avatar jeffsebring avatar jeremyfelt avatar jonathanstegall avatar joshbetz avatar jtsternberg avatar maevelander avatar mjangda avatar nickdaugherty avatar nrg-r9t avatar paulgibbs avatar philipjohn avatar rbcorrales avatar rinatkhaziev avatar sboisvert avatar shantanu2704 avatar sniperwolf avatar spencermorin avatar swissspidy avatar trepmal avatar tylercherpak avatar wboyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ad-code-manager's Issues

Two similar filters // may be needs refactoring

So we have acm_list_table_columns and acm_provider_columns. All the difference between them is that acm_list_table_columns return all table columns (e.g. id, name, priority, conditionals) and acm_provider_columns returns only ad network specific ones. May be we could use one filter and just skip service columns.

Iframe ads for double click

Hi,
When we looked at the code the specially for double click, we did not find any way to render iframe ads. Looks like right not it just supports javascript as. Is there a plan to incorporate iframe ads too?

Regards
Amit Sannad

Potential issue: we need to check that user accidentally does not remove cb and id columns as it breaks UI

basically, something like this:

add_filter( 'acm_list_table_columns', 'my_acm_list_table_columns' );
function my_acm_list_table_columns( $columns ) {
    $columns = array(
        'site_name'      => __( 'Site Name', 'ad-code-manager' ),
        'zone1'          => __( 'Zone1', 'ad-code-manager' ),
        'campaign'       => __( 'Campaign', 'ad-code-manager' ),
        'priority'       => __( 'Priority', 'ad-code-manager' ),
        'conditionals'   => __( 'Conditionals', 'ad-code-manager' ),
    );
    return $columns;
}

will break UI for good.

Rework contextual help

I got an idea this morning. We all know that repetition is bad. So instead of writing a readme section and then duplicating it as a contextual help, we could parse Markdown from readme.

Pagination Idea

Per our first real world tester Steve Baron:

It would be nice to have kind of responsive approach and paginate records only if their total rendered height exceeds available viewport space.

Ad codes without a priority end up defaulting to zero

This is related to the upgrade path from v0.1.3 to v0.2 and I unfortunately noticed it after I shipped v0.2. It shouldn't be too big of a problem because we have some redundant checks in place.

Basically, ad codes in v0.1.3 didn't have priorities set. In v0.2, our get_ad_codes() query doesn't account for this fact when it should. If the postmeta value returns empty, we should set the priority to 10.

Provide inline help regarding conditionals

The whole conditionals thing might be confusing for end users. We should provide inline help, so that whenever users selects a conditional we display a short description on how to use this conditional, what arguments it might take, etc. See #46 for discussion

Feature: Configuration scanner

It would be nice to have config scanner to check if the plugin is configured properly:

  • provider file is present,
  • ACM_WP_List_Table columns are properly defined,
  • ad code args are set correctly, there’s at least one tag id,
  • etc, you name it

Update readme with what's new in v0.2

Let's make sure the readme is all up to date with what's new and what we've changed. Going through our Github issues and the commit messages is a good way of tracking this down.

Create new priority declaration argument for ad codes

Hey,

has_category produces incorrect results. For example, if we are on home page, and there's a loop with posts where has_category( 'news', $post_id ) equals true, the news ad code will be added to $display_codes

We don't have any control over which code to display:

$code_to_display = $display_codes[0];

If has_category conditional was evaluated before is_home conditional, wrong ad code will be rendered.

I've made a workaround for this issue: https://gist.github.com/56f5825bd42200b7b36d

I'm not sure of proper way to fix it, but we might want to implement priority.

<?php
$display_codes = array( '0' => array ( array( /* homepage ad code */ ) ),
                       '10' => array ( array( /* news ad code */ ) ),
                       );
// and then we just
$priority = min( array_keys( $display_codes ) ); // or max
$code_to_display = $display_codes[$priority][0]

Allow columns to be optional when creating and editing ad codes

In both edit_ad_code() and create_ad_code(), the process is aborted if we run into a column that has been registered for the provider, but not available as part of the ad code data.

Depending on the view, it is possible that not all ad codes will make use of every column. Ideally, we'd have a way for provider authors to specify which columns are required or optional.

AND conditional

Setting the logical operator from OR to AND does not seem to result in the expected behaviour for displaying ads.

For example:
Adding the conditional 'has_category' with value 'category 1' results in the ads only being displayed on category 1 pages.
Adding the conditional 'is_archive' with value '1' results in the ads only being displayed on archive pages.
However, including both conditionals shows the ads on all archive pages (if has_category is followed by is_archive) or all category 1 pages (if is_archive is followed by has_category).
The expected behaviour would be to only show ads on category 1 archive pages.

bug with acm_display_ad_codes_without_conditionals

Take a look at https://github.com/Automattic/Ad-Code-Manager/blob/develop/ad-code-manager.php#L970.
If we don't have any conditionals and acm_display_ad_codes_without_conditionals returns true we add ad code to display list and then continue. In reality ad code without conditionals still gets to display_list.

Workaround would be:

            if ( empty( $ad_code['conditionals'] ) && ! apply_filters( 'acm_display_ad_codes_without_conditionals', false ) ) {
                continue;
            }

It works fine, but looks bizarre. It's the only one blocker i encountered so far while testing v0.2-alpha against sandboxed copy of a real site.

Broken link in VIP Lobby

The link pointing to Github in the VIP lobby still points to the old Github URL. This might not be the best place to point it out, but it felt awkward firing off an e-mail to support@ just for that. :)

Check if the tag is unique for DFP Async

There might be a case when there are two tags registered with the same dimensions and the same tag id ( which is just a div id ). This confuses DFP Async, so we need to make sure that tags are unique

Write a readme

This plugin should have a readme describing how to set it up, etc.

Use OR not AND by default

Conditionals should be evaluated with OR logic, otherwise the plugin won't render codes properly.

Example:


will never produce correct ad code, because one of them never equals true

Easy Google AdSense integration

Similar to what we've done with Google DFP Async, it would be great if our Google AdSense provider file offered much simpler integration.

Allow the logical operator to be set on a code by code basis

Say I want one ad code to be evaluated as:

has_tag apple AND
is_singular

and another to be evaluated as

is_category OR
is_tag OR
is_archive

This currently isn't possible. I think the best way to accomodate is by adding another interface element to the admin screen.

Feature: ACM in Debug Bar

Would often be useful to have a debug bar extension for Ad Code Manager rather than needing to view the source of a page to confirm that ad tags are displaying right.

So, if this were to happen, what's the thought on where - separate plugin entirely or part of ACM by default?

My initial thought is to make a separate plugin entirely just to avoid extra code in the main ACM codebase.

Feature: Ad Code Preview

This should be probably a row action which either pops an overlay with previews or displays them inline

Abstract provider-specific code and data to a /providers/ folder

I thought of this as a way to abstract out the DFP-related code and also support other ad networks.

Basically, we'd have a file in a /providers/ directory for each ad network. This file would include all of the necessary defaults, configuration, whitelisted domains, etc. for that ad network. It would interact with the plugin by manipulating the filters we have set up. We'd make choosing your provider a code-level option or, if there were more than one, have a dropdown selector in the admin interface.

Add "delete" icon and action for inline editing conditionals

When you're editing an ad code with the inline edit functionality, you should be able to delete an existing conditional.

All that's needed for this implementation is a bit of JS that removes the input element from the DOM. When the user submits the form, the data will no longer exist and the conditional will be removed from the ad code

Include screenshots in the documentation

To show potential users what the admin interface looks like and how you should use it, we should include screenshots.

We should probably clean up the admin interface a bit first though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.