Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic browser/device targeting to billboards #20680

Closed
wants to merge 2 commits into from

Conversation

benhalpern
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Allow billboards to target a browser context (i.e. desktop browser, mobile browser, in-app browser). We could add other specific targeting to the list in the future (i.e. tablet, etc. IOS/Android, Mac/Windows) if we have that need, but keeping it to simple use cases for now.

Related Tickets & Documents

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

@@ -79,7 +80,7 @@ class Billboard < ApplicationRecord

self.table_name = "display_ads"

def self.for_display(area:, user_signed_in:, user_id: nil, article: nil, user_tags: nil, location: nil, cookies_allowed: false)
def self.for_display(area:, user_signed_in:, user_id: nil, article: nil, user_tags: nil, location: nil, cookies_allowed: false, user_agent: nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [rubocop] <Layout/LineLength> reported by reviewdog 🐶
Line is too long. [146/120] (https://rubystyle.guide#max-line-length)

Copy link
Contributor

github-actions bot commented Feb 26, 2024

Uffizzi Ephemeral Environment Deploying

☁️ https://app.uffizzi.com/github.com/forem/forem/pull/20680

⚙️ Updating now by workflow run 8055656740.

What is Uffizzi? Learn more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Target billboards depending on user device type
1 participant