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

Survey does not show with SDK 5.7.1 #230

Open
hydejiaqi opened this issue Nov 16, 2021 · 5 comments
Open

Survey does not show with SDK 5.7.1 #230

hydejiaqi opened this issue Nov 16, 2021 · 5 comments

Comments

@hydejiaqi
Copy link

hydejiaqi commented Nov 16, 2021

Hi, we want to upgrade the SDK to 5.7.1, but I find out the survey never shows with latest SDK, and once I switch back to SDK 5.6.4, the survey just works as expected.

I/Apptentive: Registering Apptentive Android SDK 5.7.1
I/Apptentive: [Apptentive Queue] [CONVERSATION] Loading 'anonymous' conversation...
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'com.apptentive#app#launch'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'local#app#saved_home'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluated => false
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'local#app#filter_changed'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluated => false
I/Apptentive: Registering Apptentive Android SDK 5.6.4
I/Apptentive: [Apptentive Queue] [CONVERSATION] Loading 'anonymous' conversation...
I/Apptentive: [Apptentive Queue] [CONVERSATION] SDK version was changed: 5.7.1 => 5.6.4
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'com.apptentive#app#launch'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'local#app#filter_changed'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluated => true
I/Apptentive: [INTERACTIONS] Launching interaction: 'Survey'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'com.apptentive#Survey#launch'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'com.apptentive#Survey#question_response'
I/Apptentive: Survey Submitted.
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'com.apptentive#Survey#submit'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'local#app#saved_home'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluated => false

@CaseyApptentive
Copy link

Hi @hydejiaqi. Sorry that you're having trouble.

It looks like the criteria for the interactions aren't being met. That's what we're seeing in the logs after each "engage event" is being evaluated. Here's an example of the key section.

I/Apptentive: [Apptentive Queue] [INTERACTIONS] Engage event: 'local#app#saved_home'
I/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluated => false

You can see that the event is successfully engaged, and then the criteria is evaluated false, which just means that the targeting hasn't been fulfilled.

There are a few options for investigating and fixing this:

  • On your survey, do you have it set to allow multiple responses? If your device has already submitted one, you may simply not be able to submit another due to this requirement.
    Screen Shot 2021-11-16 at 2 07 52 PM
  • I'd also recommend following these steps between tests to ensure that you have a clean slate: https://learn.apptentive.com/knowledge-base/testing-your-apptentive-integration-android/#testing-new-or-modified-interactions
  • Double check other targeting settings as well, and make sure your device qualifies to see the interaction. If you're still having troubles, you could pull verbose logs and it would tell us exactly why the criteria is evaluating false.

Thanks!

@hydejiaqi
Copy link
Author

hydejiaqi commented Nov 17, 2021

@CaseyApptentive, thanks for your quick reply.

I am using the same survey settings for both 5.7.1 and 5.6.4 SDK, but the criteria evaluated always returns false while using SDK 5.7.1. The only change I do is just change the SDK version to 5.7.1.

I pull the verbose logs, looks like the random survey id we set in the custom device data is always null in the log, and we use that value in the survey settings.
In our code, we add this id after initial Apptentive by
Apptentive.addCustomDeviceData( "ApptentiveRandomSurveyKey", deviceData )

But in the verbose log, the value is always null

D/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluation details:

- $and:

  - $or:

    - person_data['ApptentiveRandomSurveyKey'] ('null') greater than '50' => false 

When I switch back to 5.6.4 SDK without any other changes in our code, the survey works as expected. Our survey id is not null in the log

D/Apptentive: [Apptentive Queue] [INTERACTIONS] Criteria evaluation details:

- $and:

  - $or:

    - person_data['ApptentiveRandomSurveyKey'] ('72') greater than '50' => true

  - current time ('1.637109009873E9') is greater than or equal to '1.6327872E9' => true

I wonder is there any changes related to custom device data in the latest SDK ? Thanks.

@CaseyApptentive
Copy link

Thanks for the thorough logs! Looking into this now.

It does look like the null with ApptentiveRandomSurveyKey is the problem, though it's hard to say why.

One question: are you planning on using this type of targeting in production? If so, can you help me understand what it does?

We can certainly try to straighten this out for you, but I am asking because it sounds like you might be randomly generating a number in order to make the survey show to 50% of your audience. Is that true?

I wonder because we have actually made a recent product release that does the same thing, and it would give you more flexibility.

Let me know what's the best approach.

@hydejiaqi
Copy link
Author

Thanks for the thorough logs! Looking into this now.

It does look like the null with ApptentiveRandomSurveyKey is the problem, though it's hard to say why.

One question: are you planning on using this type of targeting in production? If so, can you help me understand what it does?

We can certainly try to straighten this out for you, but I am asking because it sounds like you might be randomly generating a number in order to make the survey show to 50% of your audience. Is that true?

I wonder because we have actually made a recent product release that does the same thing, and it would give you more flexibility.

Let me know what's the best approach.

Yeah, we are currently using this type of targeting in production. I will be glade to see if there is an alternative way to do so.

@CaseyApptentive
Copy link

CaseyApptentive commented Nov 17, 2021

No problem. This feature is available on iOS SDK version 5.3.4. and Android version 5.7.0. You can access this new feature in the "Who" targeting section for any interaction type.

On the dropdown, select "Random Sampling: Percent of Customers", like this
Screen Shot 2021-11-17 at 11 25 23 AM

Here are some docs to help you make the most of it:

https://learn.apptentive.com/knowledge-base/how-to-use-random-sampling/
https://learn.apptentive.com/knowledge-base/random-sampling-use-cases/

Will that work for you?

By the way, if you reach out to us at [email protected] and let us know which app you're working on, I can connect you with someone from my team to help you use this feature. Just let us know.

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