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

[WEB-669] Facebook Conversions API Feature Flag #1766

Merged
merged 3 commits into from
Jan 17, 2023

Conversation

scottkicks
Copy link
Contributor

@scottkicks scottkicks commented Jan 11, 2023

📲 What

This PR makes the necessary code changes to add a new 'Facebook Conversions API' feature flag.

🤔 Why

With iOS 14.5+ Apple requires members to grant permission for apps to track them or access their device’s advertising identifier. This means that facebook app members can choose to "Ask app not to track".

If they do this, the facebook pixel that KS uses won't send or receive tracking data. Instead, we'll need to use their Conversions API to track and send events ourselves.

More details around this initiative can be found here

🛠 How

Boilerplate code that adds a new case to the OptimizelyFeature enum and then a helper function that checks user defaults before returning the value from the Optimizely SDK. Finally a case for the new facebookConversionsAPI feature case in OptimizelyFeatureFlagTools

👀 See

You can view the new Optimizely flag here

| After 🦋 |

| |

❗️Important Notes❗️

  • Need to update snapshot tests
  • Due to ongoing CircleCI issues I've changed the base branch to a new circleci/pipeline-queue branch off of main

@scottkicks scottkicks added this to the release-5.7.0 milestone Jan 11, 2023
@scottkicks scottkicks self-assigned this Jan 11, 2023
@kickstarter kickstarter deleted a comment from nativeksr Jan 12, 2023
@scottkicks scottkicks changed the base branch from circleci/pipeline-queue to web-861 January 12, 2023 18:50
Base automatically changed from web-861 to circleci/pipeline-queue January 17, 2023 14:47
@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #1766 (1f416aa) into circleci/pipeline-queue (dd9a5b2) will increase coverage by 0.00%.
The diff coverage is 84.00%.

@@                   Coverage Diff                    @@
##           circleci/pipeline-queue    #1766   +/-   ##
========================================================
  Coverage                    89.05%   89.05%           
========================================================
  Files                          881      881           
  Lines                        80562    80586   +24     
  Branches                     21134    21148   +14     
========================================================
+ Hits                         71744    71766   +22     
- Misses                        8062     8063    +1     
- Partials                       756      757    +1     
Impacted Files Coverage Δ
Library/OptimizelyFeature.swift 0.00% <0.00%> (ø)
...ewModels/OptimizelyFeatureFlagToolsViewModel.swift 83.33% <66.66%> (-1.20%) ⬇️
Library/OptimizelyFeature+Helpers.swift 80.00% <80.00%> (ø)
Library/OptimizelyClientTypeTests.swift 95.74% <100.00%> (ø)
Library/OptimizelyFeature+HelpersTests.swift 100.00% <100.00%> (ø)
...els/OptimizelyFeatureFlagToolsViewModelTests.swift 100.00% <100.00%> (ø)
Library/Navigation.swift 85.85% <0.00%> (+0.64%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@scottkicks scottkicks marked this pull request as ready for review January 17, 2023 15:50
@scottkicks scottkicks requested a review from msadoon January 17, 2023 15:50
Copy link
Contributor

@msadoon msadoon left a comment

Choose a reason for hiding this comment

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

Looks good, just correct that one test.

@@ -53,6 +54,7 @@ final class OptimizelyFlagToolsViewModelTests: TestCase {
OptimizelyFeature.rewardLocalPickupEnabled.rawValue: false,
OptimizelyFeature.paymentSheetEnabled.rawValue: false,
OptimizelyFeature.settingsPaymentSheetEnabled.rawValue: false,
OptimizelyFeature.facebookConversionsAPI.rawValue: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

should be false

@scottkicks scottkicks merged commit 77e4fc7 into circleci/pipeline-queue Jan 17, 2023
@scottkicks scottkicks deleted the web-669 branch January 17, 2023 16:47
scottkicks added a commit that referenced this pull request Jan 24, 2023
* [WEB-861] Consent Management feature flag (#1764)

* Add new Consent Management Dialog feature flag

* Add new Consent Management Dialog feature flag

* remove failing view controller test assertion

* formatting

* Adding a small commit so tests pass on CI.

Didn't realize that if we removed the feature from the mock client, the recording would would still have it in the snapshot and our old snapshot wouldn't have been updated yet.

* formatting

Co-authored-by: Mubarak Sadoon <msadoon@gmail.com>

* [WEB-696] FacebookResetPassword Improvements (#1765)

* remove ResetYourFacebookPasswordViewController snapshots

* rename viewmodel and viewcontroller

* viewmodel form logic suggestions

* update viewmodel tests

* ensure the scrollview is not hidden by the keyboard

* set returnKeyType to go and make api call on tap

* update accessibility on set your password view controller

* updated accessibility for facebookresetpasswordviewcontroller.

* formatting

Co-authored-by: Mubarak Sadoon <msadoon@gmail.com>

* [WEB-669] Facebook Conversions API Feature Flag (#1766)

* add facebook conversions api feature flag

* add facebook conversions api feature flag

* fix test

* [WEB-862] AppTrackingTransparency Authorization (#1772)

* set NSUserTrackingUsageDescription in plist

* request ATTrackingAuthorization on app applicationdidFinishLaunching

* formatting

* gate behind consent management dialog feature flag

* pr feedback
* ATTrackingAuthorizationStatus to its own file
* Use `.ksr_debounce` on Signal instead of `asyncAfter`
* Handle `restricted` and `@unknown` requestTrackingAuthorization status cases
* Improve unit test

* use ksr_delay insted of ksr_debounce

Co-authored-by: Mubarak Sadoon <msadoon@gmail.com>
@msadoon msadoon modified the milestones: release-5.7.0, release-5.6.1 Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants