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

Make tagEvent call the one without CLV increase if there is none #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion LocalyticsPlugin/Assets/Localytics/Localytics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,10 @@ public static void SetProfileAttribute(string attributeName, string[] attributeV
public static void TagEvent(string eventName, Dictionary<string, string> attributes = null, long customerValueIncrease = 0)
{
#if UNITY_ANDROID
LocalyticsClass.CallStatic("tagEvent", eventName, DictionaryToMap(attributes), customerValueIncrease);
if (customerValueIncrease == 0)
LocalyticsClass.CallStatic("tagEvent", eventName, DictionaryToMap(attributes));
else
LocalyticsClass.CallStatic("tagEvent", eventName, DictionaryToMap(attributes), customerValueIncrease);
#elif UNITY_IOS
string values = "";
if (attributes != null)
Expand Down
5 changes: 4 additions & 1 deletion LocalyticsPlugin/Assets/Plugins/iOS/LocalyticsUnity.mm
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,10 @@ void _setProfileAttribute(const char* attributeName, const char* values, int sco

void _tagEvent(const char* eventName, const char* attributes, long customerValueIncrease)
{
[Localytics tagEvent:LLCreateNSString(eventName) attributes:LLMakeNSDictionary(attributes) customerValueIncrease:[NSNumber numberWithLong:customerValueIncrease]];
if (customerValueIncrease == 0)
[Localytics tagEvent:LLCreateNSString(eventName) attributes:LLMakeNSDictionary(attributes)];
else
[Localytics tagEvent:LLCreateNSString(eventName) attributes:LLMakeNSDictionary(attributes) customerValueIncrease:[NSNumber numberWithLong:customerValueIncrease]];
}

void _tagScreen(const char* screenName)
Expand Down