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 ability to forget this device for testing purposes #509

Closed
aprato opened this issue Mar 3, 2021 · 9 comments
Closed

Add ability to forget this device for testing purposes #509

aprato opened this issue Mar 3, 2021 · 9 comments

Comments

@aprato
Copy link

aprato commented Mar 3, 2021

The readme provides information on the url to call to forget the device but local data will still be left on device. Browsing the code it looks like most of the methods are there to clean things up. It would be nice to have a method to call from Swift that would reset the device to look like a first time install. Ideally a method that would call the forget device api and clean out all the local files, defaults and keychain owned by the Adjust SDK.

@uerceg
Copy link
Contributor

uerceg commented Mar 3, 2021

Hi @aprato

Thanks for suggestion. In theory, we do have teardown logic implemented inside of the SDK which we use for testing purposes, but we are not actively exposing this to outer world nor encouraging its usage since might bring some undesired issues in case it ends up being misused.

What would be the purpose of this for your use case? Asking because in case you don't need this during runtime, simple app reinstall pretty much handles all the files SDK might be creating and executing code snippet like this can make sure that all the things from Keychain are wiped out.

Cheers

@aprato
Copy link
Author

aprato commented Mar 3, 2021

Hi @uerceg
I am integrating the SDK for the first time. Trying to test without IDFA. I'm not seeing Install Tracked and while calling the api and deleting the app is possibly working I just don't know. I keep getting the same adid between installs. Is that stored in the keychain? Is there a method to clean the adjust stuff from the keychain? Or is it OK that adid is the same on subsequent installs?

@uerceg
Copy link
Contributor

uerceg commented Mar 3, 2021

No real need to wipe anything on your own. You can perform fresh install (Adjust definition of install which will make you see Install tracked in the logs):

  • Uninstall app from your device.
  • Go to testing console (in dashboard) and forget your test device from our backend.
  • Reinstall app on your test device.

And you should see install being tracked again.

Let us know if it worked.

Cheers

@aprato
Copy link
Author

aprato commented Mar 3, 2021

I still don't see Install tracked in the log. I also don't see that string in the codebase. Any further way to make sure I'm getting a fresh attempt? or any other way to debug the missing Install tracked?

@uerceg
Copy link
Contributor

uerceg commented Mar 3, 2021

Did you perform all of the steps I mentioned in comment from above? Can you send over the verbose logs from your test run? Feel free to omit any sensitive information from there.

@aprato
Copy link
Author

aprato commented Mar 4, 2021

I did preform those steps. Now that I read through I do see one of the responses has Install tracked and it also seems like its finding my existing attribution. That was my initial concern with this ticket. I wanted to be able to start fresh. Here is the verbose output:


[Adjust]w: SANDBOX: Adjust is running in Sandbox mode. Use this setting for testing. Don't forget to set
[Adjust]d: Delegate implements adjustAttributionChanged:
[Adjust]w: IDFA reading has been switched off
[Adjust]d: Application Support directory not present and will be created
[Adjust]d: Adjust directory not present and will be created
[Adjust]d: File AdjustIoAttribution not found in "Application Support/Adjust" folder
[Adjust]d: File AdjustIoAttribution not found in Documents folder
[Adjust]d: File AdjustIoActivityState not found in "Application Support/Adjust" folder
[Adjust]d: File AdjustIoActivityState not found in Documents folder
[Adjust]v: Call to SKAdNetwork's registerAppForAdNetworkAttribution method made

[Adjust]d: File AdjustSessionCallbackParameters not found in "Application Support/Adjust" folder
[Adjust]d: File AdjustSessionCallbackParameters not found in Documents folder
[Adjust]d: File AdjustSessionPartnerParameters not found in "Application Support/Adjust" folder
[Adjust]d: File AdjustSessionPartnerParameters not found in Documents folder
[Adjust]i: Event buffering is enabled
[Adjust]v: Foreground timer configured to fire after 60.0 seconds of starting and cycles every 60.0 seconds
[Adjust]d: ADJUST_NO_IAD or TARGET_OS_TV not set
[Adjust]d: iAd framework successfully found in user's app
[Adjust]d: File AdjustIoPackageQueue not found in "Application Support/Adjust" folder
[Adjust]d: File AdjustIoPackageQueue not found in Documents folder
[Adjust]d: Adjust already enabled
[Adjust]d: Added sdk_click 1
[Adjust]v: Path:      /sdk_click
[Adjust]v: ClientSdk: ios4.26.1
[Adjust]v: Parameters:
[Adjust]v: 		app_token              foobartoken
[Adjust]v: 		app_updated_at         2021-03-03T15:02:17.000Z-0800
[Adjust]v: 		app_version            6
[Adjust]v: 		app_version_short      1.4
[Adjust]v: 		attribution_deeplink   1
[Adjust]v: 		bundle_id              com.foo.bar

[Adjust]v: 		country                US
[Adjust]v: 		cpu_type               CPU_SUBTYPE_ARM64_V8
[Adjust]v: 		created_at             2021-03-03T16:03:08.408Z-0800
[Adjust]v: 		details                {"Version3.1":{"iad-purchase-date":"2021-03-04T00:03:08Z","iad-keyword":"Keyword","iad-adgroup-id":"1234567890","iad-creativeset-id":"1234567890","iad-creativeset-name":"CreativeSetName","iad-campaign-id":"1234567890","iad-lineitem-id":"1234567890","iad-org-id":"1234567890","iad-conversion-date":"2021-03-04T00:03:08Z","iad-keyword-id":"12323222","iad-conversion-type":"Download","iad-country-or-region":"US","iad-org-name":"OrgName","iad-campaign-name":"CampaignName","iad-click-date":"2021-03-04T00:03:08Z","iad-attribution":"true","iad-adgroup-name":"AdGroupName","iad-keyword-matchtype":"Broad","iad-lineitem-name":"LineName"}}
[Adjust]v: 		device_name            iPhone10,3
[Adjust]v: 		device_type            iPhone
[Adjust]v: 		environment            sandbox
[Adjust]v: 		event_buffering_enabled 1
[Adjust]v: 		hardware_name          D22AP
[Adjust]v: 		idfv                   4AB4BA9F-C058-4F10-8A05-C2C88EC5B295
[Adjust]v: 		installed_at           2021-03-03T16:03:04.845Z-0800
[Adjust]v: 		language               en
[Adjust]v: 		m                      656E0044323241500D0700333131343830036400F9C100D1DE0844B85FF34CD6
[Adjust]v: 		mcc                    311
[Adjust]v: 		mnc                    480
[Adjust]v: 		needs_response_details 1
[Adjust]v: 		os_build               17H35
[Adjust]v: 		os_name                ios
[Adjust]v: 		os_version             13.7
[Adjust]v: 		source                 iad3
[Adjust]v: 		tracking_enabled       1
[Adjust]d: Wait for the app to go to the foreground to start the sdk
[Adjust]d: Adjust already enabled
[Adjust]v: Foreground timer starting
[Adjust]v: Subsession start
[Adjust]v: Makig request to endpoint: https://app.adjust.com/sdk_click
[Adjust]v: Value read from the keychain
[Adjust]v: Value read from the keychain
[Adjust]d: Added package 1 (session)
[Adjust]v: Path:      /session
[Adjust]v: ClientSdk: ios4.26.1
[Adjust]v: Parameters:
[Adjust]v: 		app_token              foobartoken
[Adjust]v: 		app_updated_at         2021-03-03T15:02:17.000Z-0800
[Adjust]v: 		app_version            6
[Adjust]v: 		app_version_short      1.4
[Adjust]v: 		attribution_deeplink   1
[Adjust]v: 		bundle_id              com.foo.bar
[Adjust]v: 		connectivity_type      2
[Adjust]v: 		country                US
[Adjust]v: 		cpu_type               CPU_SUBTYPE_ARM64_V8
[Adjust]v: 		created_at             2021-03-03T16:03:08.461Z-0800
[Adjust]v: 		device_name            iPhone10,3
[Adjust]v: 		device_type            iPhone
[Adjust]v: 		environment            sandbox
[Adjust]v: 		event_buffering_enabled 1
[Adjust]v: 		hardware_name          D22AP
[Adjust]d: Wrote Activity state: ec:0 sc:1 ssc:1 ask:0 sl:0.0 ts:0.0 la:1614816188.5 dt:(null) gdprf:0 dtps:0 att:-1
[Adjust]v: 		idfv                   4AB4BA9F-C058-4F10-8A05-C2C88EC5B295
[Adjust]v: 		installed_at           2021-03-03T16:03:04.845Z-0800
[Adjust]v: 		language               en
[Adjust]v: 		m                      656E0044323241500D0700333131343830036400F9C100D1DE0844B85FF34CD6
[Adjust]v: 		mcc                    311
[Adjust]v: 		mnc                    480
[Adjust]v: 		needs_response_details 1
[Adjust]v: 		os_build               17H35
[Adjust]v: 		os_name                ios
[Adjust]v: 		os_version             13.7
[Adjust]v: 		persistent_ios_uuid    8ceaf6c4-711c-4d75-ae03-acd075e7044e
[Adjust]v: 		session_count          1
[Adjust]v: 		tracking_enabled       1
[Adjust]d: Package handler wrote 1 packages
[Adjust]v: Makig request to endpoint: https://app.adjust.com/session
[Adjust]v: Response: {"app_token":"foobartoken","adid":"7d3e3024dac92878f63eb8476e296912","timestamp":"2021-03-04T00:03:09.040Z+0000","message":"Install tracked","ask_in":2000}
[Adjust]d: Request succeeded with current URL strategy
[Adjust]d: Got JSON response with message: Install tracked
[Adjust]d: Waiting to query attribution in 2000 milliseconds
[Adjust]v: Attribution timer starting. Launching in 2.0 seconds
[Adjust]d: Wrote Activity state: ec:0 sc:1 ssc:1 ask:1 sl:0.0 ts:0.0 la:1614816188.5 dt:(null) gdprf:0 dtps:0 att:-1
[Adjust]d: Package handler wrote 0 packages
[Adjust]v: Response: {"timestamp":"2021-03-04T00:03:09.043Z+0000","message":"Unattributable SDK click ignored."}
[Adjust]d: Request succeeded with current URL strategy
[Adjust]d: Got click JSON response with message: Unattributable SDK click ignored.
[Adjust]i: Received iAd click response
[Adjust]d: Wrote Activity state: ec:0 sc:1 ssc:1 ask:1 sl:0.0 ts:0.0 la:1614816188.5 dt:(null) gdprf:0 dtps:0 att:-1
[Adjust]d: Wrote Activity state: ec:0 sc:1 ssc:1 ask:0 sl:0.0 ts:0.0 la:1614816188.5 dt:(null) gdprf:0 dtps:0 att:-1
[Adjust]v: Attribution timer fired
[Adjust]v: Value read from the keychain
[Adjust]v: Path:      /attribution
[Adjust]v: ClientSdk: ios4.26.1
[Adjust]v: Parameters:
[Adjust]v: 		app_token              foobartoken
[Adjust]v: 		app_version            6
[Adjust]v: 		app_version_short      1.4
[Adjust]v: 		attribution_deeplink   1
[Adjust]v: 		bundle_id              com.foo.bar
[Adjust]v: 		created_at             2021-03-03T16:03:11.394Z-0800
[Adjust]v: 		device_name            iPhone10,3
[Adjust]v: 		device_type            iPhone
[Adjust]v: 		environment            sandbox
[Adjust]v: 		event_buffering_enabled 1
[Adjust]v: 		idfv                   4AB4BA9F-C058-4F10-8A05-C2C88EC5B295
[Adjust]v: 		initiated_by           backend
[Adjust]v: 		installed_at           2021-03-03T16:03:04.845Z-0800
[Adjust]v: 		m                      656E0044323241500D0700333131343830036400F9C100D1DE0844BB5FF34CD6
[Adjust]v: 		needs_response_details 1
[Adjust]v: 		os_build               17H35
[Adjust]v: 		os_name                ios
[Adjust]v: 		os_version             13.7
[Adjust]v: 		persistent_ios_uuid    8ceaf6c4-711c-4d75-ae03-acd075e7044e
[Adjust]v: 		tracking_enabled       1
[Adjust]v: Response: {"app_token":"foobartoken","adid":"7d3e3024dac92878f63eb8476e296912","timestamp":"2021-03-04T00:03:12.726Z+0000","message":"Attribution found","attribution":{"tracker_token":"b2zwr36","tracker_name":"Organic","network":"Organic"}}
[Adjust]d: Request succeeded with current URL strategy
[Adjust]d: Got attribution JSON response with message: Attribution found
[Adjust]d: Wrote Activity state: ec:0 sc:1 ssc:1 ask:0 sl:0.0 ts:0.0 la:1614816188.5 dt:(null) gdprf:0 dtps:0 att:-1
[Adjust]d: Wrote Attribution: tt:b2zwr36 tn:Organic net:Organic cam:(null) adg:(null) cre:(null) cl:(null) adid:7d3e3024dac92878f63eb8476e296912 ct:(null) ca:(null) cc:(null)
[Adjust]d: Launching attribution changed delegate

@uerceg
Copy link
Contributor

uerceg commented Mar 4, 2021

This response from backend ({"app_token":"foobartoken","adid":"7d3e3024dac92878f63eb8476e296912","timestamp":"2021-03-04T00:03:09.040Z+0000","message":"Install tracked","ask_in":2000}) indicates that we tracked the install for your test device. So I'd say that everything looks pretty good, you followed these steps and you can do that pretty much every time you wanna make test in which you want to recreate install tracking scenario with Adjust.

@aprato
Copy link
Author

aprato commented Mar 4, 2021

Ok good to know that part is working. Now I need to figure out why the attribution is organic even though I clicked a link. Thanks

@aprato aprato closed this as completed Mar 4, 2021
@uerceg
Copy link
Contributor

uerceg commented Mar 4, 2021

Make sure to double check if you have fingerprinting for clicks enabled for the tracker you used in that link. When you create new tracker, it's OFF by default.

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

No branches or pull requests

2 participants