ããã¯ãã€ãã£ãadjustâ¢iOS SDKã¬ã€ãã§ããadjustâ¢ã«ã€ããŠã¯adjust.comãã芧ãã ããã
Web viewã䜿çšããã¢ããªã§ãJavascriptã³ãŒãããAdjustã®ãã©ããã³ã°ããå©çšããã ãã«ã¯ã iOS Web view SDKã¬ã€ããã確èªãã ããã
Read this in other languages: English, äžæ, æ¥æ¬èª, íêµìŽ.
iOS (Objective-C)
ãšiOS (Swift)
ãtvOS
ãiMessage
ãApple Watch
ã®ãµã³ãã«ã¢ããªãexamples
ãã€ã¬ã¯ããªãŒã«ãããŸãã
ãã®Xcodeãããžã§ã¯ããéãã°ãadjust SDKã®çµ±åæ¹æ³ã®å®äŸãã確èªããã ããŸãã
adjust SDKãiOSãããžã§ã¯ãã«é£æºããæé ã説æããŸãã ããã§ã¯ãiOSã¢ããªã±ãŒã·ã§ã³ã®éçºã«Xcodeã䜿çšããŠãããšæ³å®ããŠããŸãã
CocoaPodsã䜿çšããŠããå Žåã¯ãPodfile
ã«ä»¥äžã®ã³ãŒããè¿œå ãã
ãã¡ãã®æé ã«é²ãã§ãã ããã
pod 'Adjust', '~> 4.24.0'
ãŸãã¯
pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.24.0'
Carthageã䜿çšããŠããå Žåã¯ãCartfile
ã«ä»¥äžã®ã³ãŒããè¿œå ãã
ãã¡ãã®æé ã«é²ãã§ãã ããã
github "adjust/ios_sdk"
adjust SDKã¯ãã¬ãŒã ã¯ãŒã¯ãšããŠãããžã§ã¯ãã«è¿œå ããããšãã§ããŸãã ãªãªãŒã¹ããŒãžã«ä»¥äžã®3ã€ã®ã¢ãŒã«ã€ãããããŸãã
AdjustSdkStatic.framework.zip
AdjustSdkDynamic.framework.zip
AdjustSdkTv.framework.zip
AdjustSdkIm.framework.zip
iOS 8ãªãªãŒã¹ä»¥éãAppleã¯Dynamic Frameworks (Embedded Framework)ãå°å ¥ããŠããŸãã iOS 8以éã®ç«¯æ«ãã¿ãŒã²ããã«ããŠããå Žåã¯ãadjustã® SDK dynamic frameworkã䜿çšã§ããŸãã StaticãDynamicãã¬ãŒã ã¯ãŒã¯ãéžæãããããžã§ã¯ãã«è¿œå ããŠãã ããã
tvOS
ã¢ããªã®å Žåãadjust SDKã®å©çšãå¯èœã§ãã
AdjustSdkTv.framework.zip
ã¢ãŒã«ã€ãããadjustã®tvOSãã¬ãŒã ã¯ãŒã¯ãå±éããŠãã ããã
åæ§ã«iMessage
ã¢ããªã®å Žåãadjust SDKã®å©çšãå¯èœã§ããAdjustSdkIm.framework.zip
ã¢ãŒã«ã€ãããIMãã¬ãŒã ã¯ãŒã¯ãå±éããŠãã ããã
ã¢ããªã«iOSãã¬ãŒã ã¯ãŒã¯ãè¿œå ã§é£æºããå ŽåãAdjust SDKã¯ãã®æ å ±ãåŒã³åºããååŸããããšãã§ããŸããiOSãã¬ãŒã ã¯ãŒã¯ã«å¯Ÿå¿ããAdjust SDKã®æ©èœãæå¹åããã«ã¯ã以äžã®ãã¬ãŒã ã¯ãŒã¯ãã¢ããªã«è¿œå ããŠãã ããã
AdSupport.framework
- SDKãIDFAå€ããã³ïŒiOS 14ããåã®ïŒLATæ å ±ãåŒã³åºããããã«ããŸããiAd.framework
- SDKãå®è¡äžã®ASAãã£ã³ããŒã³ã®ã¢ããªãã¥ãŒã·ã§ã³ãèªåçã«åŠçã§ããããã«ããŸããCoreTelephony.framework
- SDKãçŸåšã®Radio Access TechnologyïŒç¡ç·ã¢ã¯ã»ã¹æè¡ïŒãå€å¥ã§ããããã«ããŸããStoreKit.framework
- iOS 14ãŸãã¯ãã以éã«ãããŠããã®ãã¬ãŒã ã¯ãŒã¯ã¯ãSKAdNetworkãã®ãã¬ãŒã ã¯ãŒã¯ã«ã¢ã¯ã»ã¹ãããSKAdNetworkããšã®éä¿¡ãAdjust SDKã§èªåçã«åŠçã§ããããã«ããŸããAppTrackingTransparency.framework
-iOS 14ãŸãã¯ãã以éã«ãããŠããã®ãã¬ãŒã ã¯ãŒã¯ã¯SDKããã©ããã³ã°ã«å¯ŸãããŠãŒã¶ãŒåæã確èªãããã€ã¢ãã°ãã©ãããããŠãŒã¶ãŒã®èš±è«Ÿç¶æ³ã瀺ãå€ã«ã¢ã¯ã»ã¹ã§ããããã«ããŸãã
Podãªããžããªããadjust SDKãè¿œå ããå Žåã¯ã次ã®import statement(ã€ã³ããŒãã¹ããŒãã¡ã³ãïŒã®ãã¥ããã䜿çšããŸãã
#import "Adjust.h"
ãŸãã¯
#import <Adjust/Adjust.h>
adjust SDKãStaticãŸãã¯Dynamicãã¬ãŒã ã¯ãŒã¯ãšããŠè¿œå ããå ŽåããŸãã¯Carthageã䜿ãå Žåã¯ã以äžã®ã€ã³ããŒãã¹ããŒãã¡ã³ãã䜿çšããŸãã
#import <AdjustSdk/Adjust.h>
tvOSã¢ããªã±ãŒã·ã§ã³ã§adjust SDKã䜿çšããŠããå Žåã¯ã以äžã®ã€ã³ããŒãã¹ããŒãã¡ã³ãã䜿çšããŸãã
#import <AdjustSdkTv/Adjust.h>
iMessageã¢ããªã±ãŒã·ã§ã³ã§adjust SDKã䜿çšããŠããå Žåã¯ã以äžã®ã€ã³ããŒãã¹ããŒãã¡ã³ãã䜿çšããŸãã
#import <AdjustSdkIm/Adjust.h>
次ã«åºæ¬çãªã»ãã·ã§ã³ã®ãã©ããã³ã°ãèšå®ããŸãã
Project Navigatoräžã§ãã¢ããªã±ãŒã·ã§ã³ããªã²ãŒãã®ãœãŒã¹ãã¡ã€ã«ãéããŠãã ããã
ãœãŒã¹ã³ãŒãã®å
é ã«import
ã®èšè¿°ãè¿œå ããdidFinishLaunching
ãdidFinishLaunchingWithOptions
ã®ã¡ãœããäžã«
äžèšã®Adjust
ã³ãŒã«ï¿œãè¿œå ããŠãã ããã
#import "Adjust.h"
// or #import <Adjust/Adjust.h>
// or #import <AdjustSdk/Adjust.h>
// or #import <AdjustSdkTv/Adjust.h>
// or #import <AdjustSdkIm/Adjust.h>
// ...
NSString *yourAppToken = @"{YourAppToken}";
NSString *environment = ADJEnvironmentSandbox;
ADJConfig *adjustConfig = [ADJConfig configWithAppToken:yourAppToken
environment:environment];
[Adjust appDidLaunch:adjustConfig];
泚æ: adjust SDKã®åæåã¯ãæé ã«æ²¿ã確å®ã«
è¡ãªã£ãŠãã ããããã©ãã«ã·ã¥ãŒãã£ã³ã°ã®ã»ã¯ã·ã§ã³ã§èª¬æããŠããããã«ãããŸããŸãªåé¡ãçºçããããšããããŸãã
{YourAppToken}
ãããªãã®ã¢ããªã±ãŒã·ã§ã³ããŒã¯ã³ã«çœ®ãæããŠãã ãããããã¯ããã·ã¥ããŒãã§èŠã€ããããšãã§ããŸãã
ãã¹ãã®ããã«ã¢ããªã±ãŒã·ã§ã³ããã«ããããå®è¡ã®ããã«ãã«ããããã«ãã£ãŠã以äžã®å€ãéžã³environment
ãèšå®ããŠãã ããã
NSString *environment = ADJEnvironmentSandbox;
NSString *environment = ADJEnvironmentProduction;
éèŠ ã客æ§ãããã®ä»ã®äººãã¢ããªã®ãã¹ããããŠããå Žåã«ã®ã¿ããã®å€ã¯ADJEnvironmentSandbox
ã«èšå®ããŠãã ããã
ã¢ããªãå
¬éããçŽåã«ç°å¢ãADJEnvironmentProduction
ã«èšå®ããŠãã ãããéçºãšãã¹ããåã³éå§ããæã¯ãADJEnvironmentSandbox
ã«æ»ããŠãã ããã
ãããã®ç°å¢ãããå®éã®ãã©ãã£ãã¯ãšãã¹ãããã€ã¹ã®ãã©ãã£ãã¯ãåºå¥ããããšãã§ããŸãã ç¹ã«åçããã©ããã³ã°ããå Žåã«éèŠãªå€ãšãªããŸãã®ã§ã倧åã«ããŠãã ããã
ãœãŒã¹ããSDKãè¿œå ããïŒ adjust SDKãiMessageã¢ããªã±ãŒã·ã§ã³ã«ãœãŒã¹ããè¿œå ããå Žåãããªããã»ããµãã¯ãADJUST_IM=1ãiMessageãããžã§ã¯ãã§èšå®ãããŠããããšã確èªããŠãã ããã
SDKããã¬ãŒã ã¯ãŒã¯ãšããŠè¿œå ããïŒ iMessageã¢ããªã±ãŒã·ã§ã³ã«AdjustSdkIm.framework
ãè¿œå ããåŸãBuild Phases
ãããžã§ã¯ãèšå®ã§New Copy Files Phase
ãè¿œå ããŸããAdjustSdkIm.framework
ãFrameworks
ãã©ã«ãã«ã³ããŒããããéžæããŠãã ããã
ã»ãã·ã§ã³ãã©ããã³ã°ïŒ ã»ãã·ã§ã³ãã©ããã³ã°ãiMessageã¢ããªã§æ£ããæ©èœãããããã«ã¯ãè¿œå ã®çµ±åã¹ãããã1åå®è¡ããŠãã ãããæšæºã®iOSã¢ããªã§ã¯ãAdjust SDKã¯iOSã·ã¹ãã éç¥ã«èªåçã«ç»é²ããããã€ã¢ããªå
ã«å
¥ãããã©ã¢ã°ã©ãŠã³ãããé¢ããããç¥ãããšãã§ããŸããããã¯iMessageã¢ããªã®å Žåã«ã¯è©²åœããªããããiMessageã¢ããªãã¥ãŒã³ã³ãããŒã©ã®trackSubsessionStart
ã¡ãœãããštrackSubsessionEnd
ã¡ãœãããžã®æ瀺çãªåŒã³åºããè¿œå ããå¿
èŠããããŸãã ããã«ãããã¢ããªããã©ã¢ã°ã©ãŠã³ã㫠衚瀺ãããŠãããã©ãããSDKã«èªèãããããšãã§ããŸãã
didBecomeActiveWithConversation
ã®ã¡ãœããäžã«trackSubsessionStart
ãè¿œå ããŸã:
-(void)didBecomeActiveWithConversation:(MSConversation *)conversation {
// Called when the extension is about to move from the inactive to active state.
// This will happen when the extension is about to present UI.
// Use this method to configure the extension and restore previously stored state.
[Adjust trackSubsessionStart];
}
willResignActiveWithConversation
ã®ã¡ãœããäžã«trackSubsessionEnd
ãè¿œå ããŸãïŒ
-(void)willResignActiveWithConversation:(MSConversation *)conversation {
// Called when the extension is about to move from the active to inactive state.
// This will happen when the user dissmises the extension, changes to a different
// conversation or quits Messages.
// Use this method to release shared resources, save user data, invalidate timers,
// and store enough state information to restore your extension to its current state
// in case it is terminated later.
[Adjust trackSubsessionEnd];
}
ãã®ã»ããã䜿çšãããšãAdjust SDKã¯iMessageã¢ããªå ã§ã»ãã·ã§ã³ã®ãã©ããã³ã°ãæ£åžžã«è¡ãããšãã§ããŸãã
泚æïŒ æžã蟌ãã iOSã¢ããªãšiMessageã®æ¡åŒµæ©èœã¯ãç°ãªãã¡ã¢ãªç©ºéã§åäœããŠããããã³ãã«èå¥åãç°ãªããŸããïŒã€ã®å Žæã§åãã¢ããªããŒã¯ã³ã䜿çšããŠAdjust SDKãåæåãããšãçžäºãèªèããªã2ã€ã®ç¬ç«ããã€ã³ã¹ã¿ã³ã¹ãçæãããããã·ã¥ããŒãã®ããŒã¿ãæ··åšããŠããŸãããšããããŸãããããé¿ããããã«ãiMessageã¢ããªçšã«å¥ã®ã¢ããªãAdjustããã·ã¥ããŒãã«äœæããå¥ã®ã¢ããªããŒã¯ã³ã䜿ã£ãŠSDKã®åæåããã®äžã§è¡ã£ãŠãã ããã
ADJConfig
ã€ã³ã¹ã¿ã³ã¹ã®setLogLevel:
ã«èšå®ãããã©ã¡ãŒã¿ãå€æŽããããšã«ãã£ãŠèšé²ãããã°ã®ã¬ãã«ã調ç¯ã§ããŸãã
ãã©ã¡ãŒã¿ã¯ä»¥äžã®çš®é¡ããããŸãã
[adjustConfig setLogLevel:ADJLogLevelVerbose]; // ãã¹ãŠã®ãã°ãæå¹ã«ãã
[adjustConfig setLogLevel:ADJLogLevelDebug]; // ãã詳现ãªãã°ãèšé²ãã
[adjustConfig setLogLevel:ADJLogLevelInfo]; // ããã©ã«ã
[adjustConfig setLogLevel:ADJLogLevelWarn]; // infoã®ãã°ãç¡å¹ã«ãã
[adjustConfig setLogLevel:ADJLogLevelError]; // warningsãç¡å¹ã«ãã
[adjustConfig setLogLevel:ADJLogLevelAssert]; // errorsãç¡å¹ã«ãã
[adjustConfig setLogLevel:ADJLogLevelSuppress]; // ãã¹ãŠã®ãã°ãç¡å¹ã«ãã
æ¬çªçšã®ã¢ããªã«adjust SDKã®ãã°ã衚瀺ãããããªãå Žåã¯ããã°ã¬ãã«ãADJLogLevelSuppress
ã«èšå®ããŠãã ããã
å ããŠããã°ã¬ãã«ãsuppressã«èšå®ããéšåã§ADJConfig
ãªããžã§ã¯ãã以äžã®ããã«åæåããŠãã ããã
#import "Adjust.h"
// or #import <Adjust/Adjust.h>
// or #import <AdjustSdk/Adjust.h>
// or #import <AdjustSdkTv/Adjust.h>
// or #import <AdjustSdkIm/Adjust.h>
// ...
NSString *yourAppToken = @"{YourAppToken}";
NSString *environment = ADJEnvironmentSandbox;
ADJConfig *adjustConfig = [ADJConfig configWithAppToken:yourAppToken
environment:environment
allowSupressLogLevel:YES];
[Adjust appDidLaunch:adjustConfig];
ã¢ããªããã«ãããŠå®è¡ããŸãããããã«ããæåããããã³ã³ãœãŒã«ã«è¡šç€ºãããSDKãã°ã泚èŠããŠãã ããã
åããŠã¢ããªãå®è¡ãããããšãInstall tracked
ã®infoãåºåãããã¯ãã§ãã
adjust SDKã®å®è£ ãã§ããããæŽã«ä»¥äžã®æ©èœãå©çšããããšãã§ããŸãã
åããã±ãŒãžãéä¿¡ããããã³ã«ãAdjustã®ããã¯ãšã³ãã¯ãã¢ããªé¢é£ããŒã¿ãžã®ã¢ã¯ã»ã¹ã«é¢ãããŠãŒã¶ãŒã®èš±è«Ÿç¶æ³ãè¡šãã以äžã®4ã€ã®å€ã®ãããããåä¿¡ããŸãã
- AuthorizedïŒæ¿èªïŒ
- DeniedïŒæåŠïŒ
- Not DeterminedïŒæªæ±ºå®ïŒ
- RestrictedïŒå¶éããïŒ
ããã€ã¹ãã¢ããªé¢é£ããŒã¿ãžã®ã¢ã¯ã»ã¹ã«å¯ŸãããŠãŒã¶ãŒã®èš±è«Ÿç¶æ³ã®æ¿èªãªã¯ãšã¹ãïŒãŠãŒã¶ãŒã®ããã€ã¹ãã©ããã³ã°ã«äœ¿çšïŒãåä¿¡ããåŸã¯ãè¿ãããã¹ããŒã¿ã¹ã¯Authorizedãããã¯Deniedã«ãªããŸãã
ããã€ã¹ãã¢ããªé¢é£ããŒã¿ãžã®ã¢ã¯ã»ã¹ã®æ¿èªãªã¯ãšã¹ãïŒãŠãŒã¶ãŒãããã¯ããã€ã¹ã®ãã©ããã³ã°ã«äœ¿çšïŒãåä¿¡ããåã¯ãè¿ãããã¹ããŒã¿ã¹ã¯Not Determinedã«ãªããŸãã
ã¢ããªã®ãã©ããã³ã°ããŒã¿ã®äœ¿çšãå¶éãããŠããå Žåã¯ãè¿ãããã¹ããŒã¿ã¹ã¯Restrictedã«ãªããŸãã
衚瀺ããããããã¢ãããã€ã¢ãã°ã®ã«ã¹ã¿ãã€ãºãåžæããªãå Žåã®ããã«ããã®SDKã«ã¯ããŠãŒã¶ãŒããããã¢ãããã€ã¢ãã°ã«å¿çããåŸã«ãæŽæ°ã¹ããŒã¿ã¹ãåä¿¡ããã¡ã«ããºã ãçµã¿èŸŒãŸããŠããŸããæ°ãã蚱諟ã¹ããŒã¿ã¹ãããã¯ãšã³ãã«ç°¡åãã€å¹ççã«äŒéããããã«ãAdjust SDKã¯ã¢ããªã®ãã©ããã³ã°æ¿èªã¡ãœããã®ã©ãããŒãæäŸããŠããŸãã次ã®é ç®ã®èª¬æãã芧ãã ããã
Adjust SDKã¯ãã¢ããªãã©ããã³ã°æ¿èªã©ãããŒã䜿çšããŠãã¢ããªé¢é£ããŒã¿ãžã®ã¢ã¯ã»ã¹ã«å¯ŸãããŠãŒã¶ãŒã®èš±è«Ÿç¶æ³ããªã¯ãšã¹ãããããšãã§ããŸããAdjust SDKã«ã¯ãrequestTrackingAuthorizationWithCompletionHandler:ã¡ãœããã«åºã¥ããŠæ§ç¯ãããã©ãããŒãçšæãããŠããããŠãŒã¶ãŒã®éžæã«ã€ããŠã®æ å ±ãååŸããããã®ã³ãŒã«ããã¯ã¡ãœãããå®çŸ©ããããšãã§ããŸãããŸãããã®ã©ãããŒã䜿çšããããšã§ããŠãŒã¶ãŒããããã¢ãããã€ã¢ãã°ã«å¿çãããšããã®å 容ãã³ãŒã«ããã¯ã¡ãœããã§çŽã¡ã«äŒéãããŸããSDKã¯ããŠãŒã¶ãŒã®éžæãããã¯ãšã³ãã«ãéç¥ããŸãããNSUIntegerãã®å€ã¯ã³ãŒã«ããã¯ã¡ãœããã«ãã£ãŠäŒéãããŸããå€ã®æå³ã¯æ¬¡ã®ãšããã§ãã
- 0:
ATTrackingManagerAuthorizationStatusNotDetermined
ïŒæ¿èªã¹ããŒã¿ã¹ã¯ãæªæ±ºå®ãïŒ - 1:
ATTrackingManagerAuthorizationStatusRestricted
ïŒæ¿èªã¹ããŒã¿ã¹ã¯ãå¶éãããïŒ - 2:
ATTrackingManagerAuthorizationStatusDenied
ïŒæ¿èªã¹ããŒã¿ã¹ã¯ãæåŠãïŒ - 3:
ATTrackingManagerAuthorizationStatusAuthorized
ïŒæ¿èªã¹ããŒã¿ã¹ã¯ãæ¿èªãïŒ
ãã®ã©ãããŒã䜿çšããããã«ã¯ã次ã®ããã«åŒã³åºããŠãã ããã
[Adjust requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) {
switch (status) {
case 0:
// ATTrackingManagerAuthorizationStatusNotDetermined ã®å Žå
break;
case 1:
// ATTrackingManagerAuthorizationStatusRestricted ã®å Žå
break;
case 2:
// ATTrackingManagerAuthorizationStatusDenied ã®å Žå
break;
case 3:
// ATTrackingManagerAuthorizationStatusAuthorizedã®å Žå
break;
}
}];
Adjust iOS SDK v4.23.0以äžãå®è£ æžã¿ã§ãããã¢ããªãiOS14ã§å®è¡ãããŠããå ŽåãSKAdNetworkãšã®éä¿¡ã¯ããã©ã«ãã§ONã«èšå®ãããŸãããéžæã«ããOFFã«ããããšãã§ããŸããONã«èšå®ãããšãSDKã®åæåæã«SKAdNetworkã®ã¢ããªãã¥ãŒã·ã§ã³ãAdjustã«ãã£ãŠèªåçã«ç»é²ãããŸããconversion valueïŒã³ã³ããŒãžã§ã³å€ïŒãåä¿¡ããããã«Adjust管çç»é¢ã§ã€ãã³ããèšå®ããå Žåãconversaion valueã®ããŒã¿ã¯Adjustããã¯ãšã³ãããSDKã«éä¿¡ãããŸãããã®åŸãSDKã«ãã£ãŠconversion valueãèšå®ãããŸããSKAdNetworkã³ãŒã«ããã¯ããŒã¿ãAdjustã§åä¿¡ããåŸããã®ããŒã¿ã管çç»é¢ã«è¡šç€ºãããŸãã
Adjust SDKãSKAdNetworkãšèªåçã«éä¿¡ããªãããã«ãããå Žåã¯ãèšå®ãªããžã§ã¯ãã§æ¬¡ã®ã¡ãœãããåŒã³åºãããšã«ãã£ãŠéä¿¡ãç¡å¹åã§ããŸãã
[adjustConfig deactivateSKAdNetworkHandling];
adjustã䜿ã£ãŠã€ãã³ããã©ããã³ã°ãã§ããŸããããã§ã¯ãããã¿ã³ã®ã¿ãããæ¯åãã©ãã¯ãããå Žåã«ã€ããŠèª¬æããŸãã
dashboardã«ãŠã€ãã³ãããŒã¯ã³ãäœæãããã®ã€ãã³ãããŒã¯ã³ã¯ä»®ã«abc123
ãšããã€ãã³ãããŒã¯ã³ãšé¢é£ããŠãããšããŸãã
ã¿ããããã©ãã¯ããããããã¿ã³ã®buttonDown
ã¡ãœããã«ä»¥äžã®ãããªèšè¿°ãè¿œå ããŸãã
ADJEvent *event = [ADJEvent eventWithEventToken:@"abc123"];
[Adjust trackEvent:event];
ãããããšããã¿ã³ãã¿ãããããæã«ãã°ã«Event tracked
ãšåºåãããããã«ãªããŸãã
ãã®ã€ãã³ãã€ã³ã¹ã¿ã³ã¹ã¯ãã©ããã³ã°åã®ã€ãã³ããèšå®ããããã«ã䜿ããŸãã
åºåãã¿ããããæãã¢ããªå 課éãããæãªã©ã«ãŠãŒã¶ãŒãå ±é ¬ãåŸãä»çµã¿ã§ããã°ããããã£ãã€ãã³ãããã©ããã³ã°ã§ããŸãã 1åã®ã¿ããã§1ãŠãŒãã»ã³ãã®å ±é ¬ãšä»®å®ãããšãå ±é ¬ã€ãã³ãã¯ä»¥äžã®ããã«ãªããŸãã
ADJEvent *event = [ADJEvent eventWithEventToken:@"abc123"];
[event setRevenue:0.01 currency:@"EUR"];
[Adjust trackEvent:event];
ãã¡ããããã¯ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãšçŽä»ããããšãã§ããŸãã
é貚ããŒã¯ã³ãèšå®ããå Žåãadjustã¯èªåçã«åçãä»»æã®å ±é ¬ã«å€æããŸãã æŽã«è©³ããã¯é貚ã®å€æãã芧ãã ããã
åçãšã€ãã³ããã©ããã³ã°ã«ã€ããŠã¯ã€ãã³ããã©ããã³ã°ã¬ã€ãããåç §ãã ããã
å ±é ¬ãéè€ããŠãã©ããã³ã°ããããšãé²ãããã«ããã©ã³ã¶ã¯ã·ã§ã³IDãéæã§èšå®ããããšãã§ããŸãã ææ°ã®10ã®ãã©ã³ã¶ã¯ã·ã§ã³IDãèšæ¶ãããéè€ãããã©ã³ã¶ã¯ã·ã§ã³IDã®åçã€ãã³ãã¯é€å€ãããŸãã ããã¯ã¢ããªå 課éã®ãã©ããã³ã°ã«ç¹ã«äŸ¿å©ã§ããäžèšã«äŸãæããŸãã
ã¢ããªå
課éããã©ããã³ã°ããéã¯ãç¶æ
ãSKPaymentTransactionStatePurchased
ã«å€ãã£ãŠåããŠ
paymentQueue:updatedTransaction
äžã®finishTransaction
ã®åŸã§trackEvent
ãã³ãŒã«ããããã«ããŠãã ããã
ããããããšã§ãå®éã«ã¯çæãããªãå ±é
¬ããã©ããã³ã°ããããšãé²ãããšãã§ããŸãã
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
for (SKPaymentTransaction *transaction in transactions) {
switch (transaction.transactionState) {
case SKPaymentTransactionStatePurchased:
[self finishTransaction:transaction];
ADJEvent *event = [ADJEvent eventWithEventToken:...];
[event setRevenue:... currency:...];
[event setTransactionId:transaction.transactionIdentifier]; // avoid duplicates
[Adjust trackEvent:event];
break;
// more cases
}
}
}
adjustã®ãµãŒããŒãµã€ãã®ã¬ã·ãŒãæ€èšŒããŒã«ãPurchase Verificationã䜿ã£ãŠã¢ããªå ã§è¡ãããã¢ããªå 課éã®åŠ¥åœæ§ã調ã¹ãéã¯ã iOS purchase SDKããå©çšãã ããã詳ããã¯ãã¡ã
dashboardã§ã€ãã³ãã«ã³ãŒã«ããã¯URLãç»é²ããããšãã§ããŸããã€ãã³ãããã©ããã³ã°ããããã³ã«
ãã®URLã«GETãªã¯ãšã¹ããéä¿¡ãããŸãããã©ããã³ã°ããåã«ã€ãã³ãã§addCallbackParameter
ãã³ãŒã«ããããšã«ãã£ãŠã
ã€ãã³ãã«ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãè¿œå ã§ããŸããããããŠè¿œå ããããã©ã¡ãŒã¿ã¯ã³ãŒã«ããã¯URLã«éãããŸãã
äŸãã°ãã³ãŒã«ããã¯URLã«http://www.mydomain.com/callback
ãç»é²ããå Žåãã€ãã³ããã©ããã³ã°ã¯ä»¥äžã®ããã«ãªããŸãã
ADJEvent *event = [ADJEvent eventWithEventToken:@"abc123"];
[event addCallbackParameter:@"key" value:@"value"];
[event addCallbackParameter:@"foo" value:@"bar"];
[Adjust trackEvent:event];
ãã®å Žåãadjustã¯ãã®ã€ãã³ãããã©ããã³ã°ã以äžã«ãªã¯ãšã¹ããéãããŸãã
http://www.mydomain.com/callback?key=value&foo=bar
ãã©ã¡ãŒã¿ã®å€ãšããŠäœ¿ãããããšã®ã§ãããã¬ãŒã¹ãã«ããŒã¯ã{idfa}
ã®ãããªæ§ã
ãªåœ¢ã«å¯Ÿå¿ããŠããŸãã
åŸãããã³ãŒã«ããã¯å
ã§ããã®ãã¬ãŒã¹ãã«ããŒã¯è©²åœããã€ã¹ã®åºåäž»çšã®IDã«çœ®ãæããããŸãã
ç¬èªã«èšå®ããããã©ã¡ãŒã¿ã«ã¯äœãæ ŒçŽããŸããããã³ãŒã«ããã¯ã«è¿œå ãããŸãã
ã€ãã³ãã«ã³ãŒã«ããã¯ãç»é²ããŠããªãå Žåã¯ããããã®ãã©ã¡ãŒã¿ã¯äœ¿ãããŸããã
URLã³ãŒã«ããã¯ã«ã€ããŠè©³ããã¯ã³ãŒã«ããã¯ã¬ã€ããã芧ãã ããã å©çšå¯èœãªå€ã®ãªã¹ãããã¡ãã§åç §ããŠãã ããã
adjustã®ããã·ã¥ããŒãäžã§é£æºãæå¹åãããŠãããããã¯ãŒã¯ããŒãããŒã«éä¿¡ãããã©ã¡ãŒã¿ãèšå®ããããšãã§ããŸãã
ããã¯äžèšã®ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãšåæ§ã«æ©èœããŸããã
ADJEvent
ã€ã³ã¹ã¿ã³ã¹ã®addPartnerParameter
ã¡ãœãããã³ãŒã«ããããšã«ããè¿œå ãããŸãã
ADJEvent *event = [ADJEvent eventWithEventToken:@"abc123"];
[event addPartnerParameter:@"key" value:@"value"];
[event addPartnerParameter:@"foo" value:@"bar"];
[Adjust trackEvent:event];
ã¹ãã·ã£ã«ããŒãããŒãšãã®çµ±åã«ã€ããŠè©³ããã¯é£æºããŒãããŒã¬ã€ããã芧ãã ããã
ãã©ããã³ã°ãããã€ãã³ãã«ã«ã¹ã¿ã IDãè¿œå ã§ããŸãããã®IDã¯ã€ãã³ãããã©ããã³ã°ããæåã倱æãã®éç¥ãåãåããšããããã³ãŒã«ããã¯ãç»é²ããããšãã§ããŸãããã®IDã¯ADJEvent
ã€ã³ã¹ã¿ã³ã¹ã®setCallbackId
ã¡ãœãããšåŒã¶ããã«èšå®ã§ããŸãïŒ
ADJEvent *event = [ADJEvent eventWithEventToken:@"abc123"];
[event setCallbackId:@"Your-Custom-Id"];
[Adjust trackEvent:event];
ããã€ãã®ãã©ã¡ãŒã¿ã¯ãadjust SDKã®ã€ãã³ãããšãã»ãã·ã§ã³ããšã«éä¿¡ããããã«ä¿åãããŸãã ãã®ããããã®ãã©ã¡ãŒã¿ãè¿œå ãããšããããã¯ããŒã«ã«ä¿åããããããæ¯åè¿œå ããå¿ èŠã¯ãããŸããã åããã©ã¡ãŒã¿ãå床远å ããŠãäœãèµ·ãããŸããã
ãããã®ã»ãã·ã§ã³ãã©ã¡ãŒã¿ã¯adjust SDKãç«ã¡äžããåã«ã³ãŒã«ããããšãã§ããã®ã§ãã€ã³ã¹ããŒã«æã«éä¿¡ã確èªããããšãã§ããŸãã ã€ã³ã¹ããŒã«æã«éä¿¡ãããå Žåã¯ãadjust SDKã®ååç«ã¡äžããé ãããããšãã§ããŸãã ãã ããå¿ èŠãªãã©ã¡ãŒã¿ã®å€ãåŸãããã®ã¯ç«ã¡äžãåŸãšãªããŸãã
ã€ãã³ãã§èšå®ãããåãã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãã adjust SDKã®ã€ãã³ãããšãŸãã¯ã»ãã·ã§ã³ããšã«éä¿¡ããããã«ä¿åããããšãã§ããŸãã
ã»ãã·ã§ã³ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ã®ã€ã³ã¿ãŒãã§ã€ã¹ãšã€ãã³ãã³ãŒã«ããã¯ãã©ã¡ãŒã¿ã¯äŒŒãŠããŸãã
ã€ãã³ãã«ããŒãšå€ãè¿œå ãã代ããã«ãAdjust
ã®addSessionCallbackParameter:value:
ã¡ãœãããžã®ã³ãŒã«ã§è¿œå ãããŸãã
[Adjust addSessionCallbackParameter:@"foo" value:@"bar"];
ã»ãã·ã§ã³ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ã¯ãã€ãã³ãã«è¿œå ãããã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãšããŒãžãããŸãã ã€ãã³ãã«è¿œå ãããã³ãŒã«ããã¯ãã©ã¡ãŒã¿ã¯ãã»ãã·ã§ã³ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ããåªå ãããŸãã ã€ãã³ãã«è¿œå ãããã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãã»ãã·ã§ã³ããè¿œå ããããã©ã¡ãŒã¿ãšåãããŒãæã£ãŠããå Žåã ã€ãã³ãã«è¿œå ãããã³ãŒã«ããã¯ãã©ã¡ãŒã¿ã®å€ãåªå ãããŸãã
removeSessionCallbackParameter
ã¡ãœããã«æå®ã®ããŒãæž¡ãããšã§ã
ç¹å®ã®ã»ãã·ã§ã³ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãåé€ããããšãã§ããŸãã
[Adjust removeSessionCallbackParameter:@"foo"];
ã»ãã·ã§ã³ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãããã¹ãŠã®ããŒãšå€ãåé€ãããå Žåã¯ã
resetSessionCallbackParameters
ã¡ãœããã䜿ã£ãŠãªã»ããããããšãã§ããŸãã
[Adjust resetSessionCallbackParameters];
adjust SDKã®ã€ãã³ãããšãã»ãã·ã§ã³ããšã«éä¿¡ãããã»ãã·ã§ã³ã³ãŒã«ããã¯ãã©ã¡ãŒã¿ãããããã«ã ã»ãã·ã§ã³ããŒãããŒãã©ã¡ãŒã¿ãçšæãããŠããŸãã
ãããã¯ãããã¯ãŒã¯ããŒãããŒã«éä¿¡ãããadjust[ããã·ã¥ããŒã]ã§æå¹åãããŠããé£æºã®ããã«å©çšãããŸãã
ã»ãã·ã§ã³ããŒãããŒãã©ã¡ãŒã¿ã®ã€ã³ã¿ãŒãã§ã€ã¹ãšã€ãã³ãããŒãããŒãã©ã¡ãŒã¿ã¯äŒŒãŠããŸãã
ã€ãã³ãã«ããŒãšå€ãè¿œå ãã代ããã«ãAdjust
ã®addSessionPartnerParameter:value:
ã¡ãœãããžã®ã³ãŒã«ã§è¿œå ãããŸãã
[Adjust addSessionPartnerParameter:@"foo" value:@"bar"];
ã»ãã·ã§ã³ããŒãããŒãã©ã¡ãŒã¿ã¯ã€ãã³ãã«è¿œå ãããããŒãããŒãã©ã¡ãŒã¿ãšããŒãžãããŸããã€ãã³ãã«è¿œå ãããããŒãããŒãã©ã¡ãŒã¿ã¯ã ã»ãã·ã§ã³ããŒãããŒãã©ã¡ãŒã¿ããåªå ãããŸããã€ãã³ãã«è¿œå ãããããŒãããŒãã©ã¡ãŒã¿ã ã»ãã·ã§ã³ããè¿œå ããããã©ã¡ãŒã¿ãšåãããŒãæã£ãŠããå Žåãã€ãã³ãã«è¿œå ãããããŒãããŒãã©ã¡ãŒã¿ã®å€ãåªå ãããŸãã
removeSessionPartnerParameter
.ã¡ãœããã«æå®ã®ããŒãæž¡ãããšã§ã
ç¹å®ã®ã»ãã·ã§ã³ããŒãããŒãã©ã¡ãŒã¿ãåé€ããããšãã§ããŸãã
[Adjust removeSessionPartnerParameter:@"foo"];
ã»ãã·ã§ã³ããŒãããŒãã©ã¡ãŒã¿ãããã¹ãŠã®ããŒãšå€ãåé€ãããå Žåã¯ã
resetSessionPartnerParameters
ã¡ãœããã䜿ã£ãŠãªã»ããããããšãã§ããŸãã
[Adjust resetSessionPartnerParameters];
adjust SDKã®ã¹ã¿ãŒããé ããããšããŠããŒã¯IDãªã©ã®ã»ãã·ã§ã³ãã©ã¡ãŒã¿ãååŸãã€ã³ã¹ããŒã«æã«éä¿¡ã§ããããã«ããããšãã§ããŸãã
ADJConfig
ã€ã³ã¹ã¿ã³ã¹ã®setDelayStart
ã¡ãœããã§ãé
ãããæéãç§åäœã§èšå®ã§ããŸãã
[adjustConfig setDelayStart:5.5];
ãã®å Žåãadjust SDKã¯æåã®ã€ã³ã¹ããŒã«ã»ãã·ã§ã³ãšçæãããã€ãã³ããåãã®5.5ç§éã¯éä¿¡ããŸããã
ãã®æéãéãããŸã§ããããã¯[Adjust sendFirstPackages]
ãã³ãŒã«ããããŸã§ã
ã»ãã·ã§ã³ãã©ã¡ãŒã¿ã¯ãã¹ãŠãã£ã¬ã€ã€ã³ã¹ããŒã«ã»ãã·ã§ã³ãšã€ãã³ãã«è¿œå ãããadjust SDKã¯éåžžéãåéããŸãã
adjust SDKã®ãã£ã¬ã€ã¹ã¿ãŒãã¯æ倧ã§10ç§ã§ãã
ãã©ãã«ãŒã®ã¢ããªãã¥ãŒã·ã§ã³å€åã®éç¥ãåããããã«ãããªã²ãŒãã³ãŒã«ããã¯ãç»é²ããããšãã§ããŸãã ã¢ããªãã¥ãŒã·ã§ã³ã«ã¯è€æ°ã®ãœãŒã¹ãããåŸãããããã®æ å ±ã¯åæã«éãããšãã§ããŸããã 次ã®æé ã«åŸã£ãŠãã¢ããªããªã²ãŒãã§ããªã²ãŒããããã³ã«ãå®è£ ããŠãã ããã
ã¢ããªãã¥ãŒã·ã§ã³ããŒã¿ã«é¢ããããªã·ãŒãå¿ ãã確èªãã ããã
-
AppDelegate.h
ãéããŠã€ã³ããŒããšAdjustDelegate
ã®å®£èšãè¿œå ããŠãã ããã@interface AppDelegate : UIResponder <UIApplicationDelegate, AdjustDelegate>
-
AppDelegate.m
ãéãã以äžã®ããªã²ãŒãã³ãŒã«ããã¯é¢æ°ãè¿œå ããŠãã ããã- (void)adjustAttributionChanged:(ADJAttribution *)attribution { }
-
ADJConfig
ã€ã³ã¹ã¿ã³ã¹ã«ããªã²ãŒããèšå®ããŠãã ããã[adjustConfig setDelegate:self];
ããªã²ãŒãã³ãŒã«ããã¯ãADJConfig
ã€ã³ã¹ã¿ã³ã¹ã䜿ã£ãŠããããã[Adjust appDidLaunch:adjustConfig]
ãã³ãŒã«ããåã«setDelegate
ãã³ãŒã«ããå¿
èŠããããŸãã
ãã®ããªã²ãŒãé¢æ°ã¯ãSDKãæåŸã®ã¢ããªãã¥ãŒã·ã§ã³ããŒã¿ãååŸããæã«äœåããŸãã
ããªã²ãŒãé¢æ°å
ã§attribution
ãã©ã¡ãŒã¿ã確èªããããšãã§ããŸãããã®ãã©ã¡ãŒã¿ã®ããããã£ã®æŠèŠã¯ä»¥äžã®éãã§ãã
NSString trackerToken
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ãã©ãã«ãŒããŒã¯ã³NSString trackerName
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ãã©ãã«ãŒåNSString network
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ãããã¯ãŒã¯ã®ã°ã«ãŒãéå±€NSString campaign
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ãã£ã³ããŒã³ã®ã°ã«ãŒãéå±€NSString adgroup
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ã¢ãã°ã«ãŒãã®ã°ã«ãŒãéå±€NSString creative
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ã¯ãªãšã€ãã£ãã®ã°ã«ãŒãéå±€NSString clickLabel
ææ°ã¢ããªãã¥ãŒã·ã§ã³ã®ã¯ãªãã¯ã©ãã«NSString adid
adjustãŠããŒã¯ID
Adjust SDKãå©çšããŠã以äžã®ã¡ãœãããåŒã³åºãåºååçæ å ±ãèšæž¬ããããšãã§ããŸãã
[Adjust trackAdRevenue:source payload:payload];
Adjust SDKã«ãã¹ããã¡ãœããã®åŒæ°ã¯ä»¥äžã®éãã§ãã
source
- åºååçæ å ±ã®ãœãŒã¹ãæå®ããNSString
ãªããžã§ã¯ãpayload
- åºååçã®JSONãæ ŒçŽããNSData
ãªããžã§ã¯ã
çŸåšãåŒç€Ÿã¯ä»¥äžã®source
ãã©ã¡ãŒã¿ã®å€ã®ã¿å¯Ÿå¿ããŠããŸãã
ADJAdRevenueSourceMopub
- ã¡ãã£ãšãŒã·ã§ã³ãã©ãããã©ãŒã ã®MoPubã瀺ããŸããïŒè©³çŽ°ã¯ãçµ±åã¬ã€ããåç §ãã ããïŒ
ã€ãã³ããšã»ãã·ã§ã³ã®åæ¹ãããã¯ã©ã¡ããããã©ããã³ã°ããæåã倱æãã®éç¥ãåãåããããããªã²ãŒãã³ãŒã«ããã¯ãç»é²ããããšãã§ããŸãã
ã¢ããªãã¥ãŒã·ã§ã³ã³ãŒã«ããã¯ã«äœ¿ãããAdjustDelegate
ãããã³ã«ãããã§ãä»»æã§äœ¿ãããšãã§ããŸãã
æåããã€ãã³ããžã®ããªã²ãŒãã³ãŒã«ããã¯é¢æ°ã以äžã®ããã«å®è£ ããŠãã ããã
- (void)adjustEventTrackingSucceeded:(ADJEventSuccess *)eventSuccessResponseData {
}
倱æããã€ãã³ããžã¯ä»¥äžã®ããã«å®è£ ããŠãã ããã
- (void)adjustEventTrackingFailed:(ADJEventFailure *)eventFailureResponseData {
}
åæ§ã«ãæåããã»ãã·ã§ã³
- (void)adjustSessionTrackingSucceeded:(ADJSessionSuccess *)sessionSuccessResponseData {
}
倱æããã»ãã·ã§ã³
- (void)adjustSessionTrackingFailed:(ADJSessionFailure *)sessionFailureResponseData {
}
ããªã²ãŒãé¢æ°ã¯SDKããµãŒããŒã«ããã±ãŒãžéä¿¡ãè©Šã¿ãåŸã§åŒã°ããŸãã ããªã²ãŒãã³ãŒã«ããã¯å ã§ããªã²ãŒãã³ãŒã«ããã¯çšã®ã¬ã¹ãã³ã¹ããŒã¿ãªããžã§ã¯ãã確èªããããšãã§ããŸãã ã¬ã¹ãã³ã¹ããŒã¿ã®ããããã£ã®æŠèŠã¯ä»¥äžã®éãã§ãã
NSString message
ãµãŒããŒããã®ã¡ãã»ãŒãžãŸãã¯SDKã®ãšã©ãŒãã°NSString timeStamp
ãµãŒããŒããã®ã¿ã€ã ã¹ã¿ã³ãNSString adid
adjustããæäŸããããŠããŒã¯ããã€ã¹IDNSDictionary jsonResponse
ãµãŒããŒããã®ã¬ã¹ãã³ã¹ã®JSONãªããžã§ã¯ã
ã€ãã³ãã®ã¬ã¹ãã³ã¹ããŒã¿ã¯ä»¥äžãå«ã¿ãŸãã
NSString eventToken
ãã©ããã³ã°ãããããã±ãŒãžãã€ãã³ãã ã£ãå Žåããã®ã€ãã³ãããŒã¯ã³NSString callbackid
ã€ãã³ããªããžã§ã¯ãã«ã«ã¹ã¿ã èšå®ãããã³ãŒã«ããã¯ID
倱æããã€ãã³ããšã»ãã·ã§ã³ã¯ä»¥äžãå«ã¿ãŸãã
BOOL willRetry
ãã°ããåŸã«åéãè©Šã¿ãäºå®ã§ãããã©ããã瀺ããŸãã
setEnabled
ã«ãã©ã¡ãŒã¿NO
ãæž¡ãããšã§ãadjustSDKãè¡ãããã€ã¹ã®ã¢ã¯ãã£ããã£ã®ãã©ããã³ã°ããã¹ãŠç¡å¹ã«ããããšãã§ããŸãã
ãã®èšå®ã¯ã»ãã·ã§ã³éã§èšæ¶ãããŸã æåã®ã»ãã·ã§ã³ã®åŸã§ããæå¹åã§ããŸããã
[Adjust setEnabled:NO];
adjustã®ãµãŒããŒãžã®éä¿¡ãäžæåæ¢ããä¿æãããŠãããã©ããã³ã°ããŒã¿ãåŸããéä¿¡ããããã« adjust SDKããªãã©ã€ã³ã¢ãŒãã«ããããšãã§ããŸãã ãªãã©ã€ã³ã¢ãŒãäžã¯ãã¹ãŠã®æ å ±ããã¡ã€ã«ã«ä¿åãããã®ã§ãã€ãã³ããããããçºçãããããªãããã«ã泚æãã ããã
YES
ãã©ã¡ãŒã¿ã§setOfflineMode
ãåŒã³åºããšãªãã©ã€ã³ã¢ãŒããæå¹ã«ã§ããŸãã
[Adjust setOfflineMode:YES];
å察ã«ãNO
ãã©ã¡ãŒã¿ã§setOfflineMode
ãåŒã³åºãã°ãªãã©ã€ã³ã¢ãŒãã解é€ã§ããŸãã
adjust SDKããªã³ã©ã€ã³ã¢ãŒãã«æ»ã£ãæãä¿åãããŠããæ
å ±ã¯æ£ããã¿ã€ã ã¹ã¿ã³ãã§adjustã®ãµãŒããŒã«éãããŸãã
ãã©ããã³ã°ã®ç¡å¹åãšã¯ç°ãªãããã®èšå®ã¯ã»ãã·ã§ã³éã§èšæ¶ãããŸããã ãªãã©ã€ã³ã¢ãŒãæã«ã¢ããªãçµäºããŠãã次ã«èµ·åããæã«ã¯ãªã³ã©ã€ã³ã¢ãŒããšããŠã¢ããªãèµ·åããŸãã
ã€ãã³ããã©ããã³ã°ãé
·äœ¿ããŠããå ŽåãHTTPãªã¯ãšã¹ããé
ãããŠ1åæ¯ã«ãŸãšããŠéä¿¡ããã»ããããå ŽåããããŸãã
ãã®å Žåã¯ãADJConfig
ã€ã³ã¹ã¿ã³ã¹ã§ã€ãã³ããããã¡ãªã³ã°ãæå¹ã«ããŠãã ããã
[adjustConfig setEventBufferingEnabled:YES];
èšå®ãããŠããªãå Žåãã€ãã³ããããã¡ãªã³ã°ã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸãã
次ã®ã¡ãœãããåŒã³åºããšãEUã®äžè¬ããŒã¿ä¿è·èŠå¶ïŒGDPRïŒç¬¬17æ¡ã«åŸãããŠãŒã¶ãŒãæ¶å»ããæš©å©ïŒå¿ããããæš©å©ïŒãè¡äœ¿ããéã«Adjust SDKãAdjustããã¯ãšã³ãã«æ å ±ãéç¥ããŸãã
[Adjust gdprForgetMe];
ãã®æ å ±ãåãåããšãAdjustã¯ãŠãŒã¶ãŒã®ããŒã¿ãæ¶å»ããAdjust SDKã¯ãŠãŒã¶ãŒã®è¿œè·¡ãåæ¢ããŸãããã®åé€ããã端æ«ããã®ãªã¯ãšã¹ãã¯ä»åŸãAdjustã«éä¿¡ãããŸããã
adjust SDKã¯ããã©ã«ãã§ã¯ã¢ããªãããã¯ã°ã©ãŠã³ãã«ããæã¯HTTPãªã¯ãšã¹ããåæ¢ããŸãã
ãã®èšå®ã¯AdjustConfig
ã€ã³ã¹ã¿ã³ã¹ã§å€æŽã§ããŸãã
[adjustConfig setSendInBackground:YES];
èšå®ãããŠããªãå Žåãããã¯ã°ã©ãŠã³ãã§ã®éä¿¡ã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸãã
Google Analyticsãªã©ã®äžéšã®ãµãŒãã¹ã§ã¯ãã¬ããŒãã®éè€ãé²ãããã«ããã€ã¹IDãšã¯ã©ã€ã¢ã³ãIDãé£æºãããããšãæ±ããããŸãã
ããã€ã¹ID IDFAãååŸããã«ã¯ãidfa
é¢æ°ãã³ãŒã«ããŠãã ããã
NSString *idfa = [Adjust idfa];
ããã·ã¥éç¥ã®ããŒã¯ã³ãéä¿¡ããã«ã¯ãã¢ããªã±ãŒã·ã§ã³ããªã²ãŒãã«ãŠ
didRegisterForRemoteNotificationsWithDeviceToken
å
ã®Adjust
ã«ä»¥äžã®èšè¿°ãè¿œå ããŠãã ããã
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[Adjust setDeviceToken:deviceToken];
}
ãã§ã«ã¢ããªãã€ã³ã¹ããŒã«ããããšã®ãããŠãŒã¶ãŒãadjust SDKã䜿ã£ãŠèå¥ãããå Žåã¯ã次ã®æé ã§èšå®ãè¡ã£ãŠãã ããã
-
dashboardäžã§æ°ãããã©ãã«ãŒãäœæããŠãã ããã
-
App Delegateãéãã
ADJConfig
ã®ããã©ã«ããã©ãã«ãŒãèšå®ããŠãã ãããADJConfig *adjustConfig = [ADJConfig configWithAppToken:yourAppToken environment:environment]; [adjustConfig setDefaultTracker:@"{TrackerToken}"]; [Adjust appDidLaunch:adjustConfig];
{TrackerToken}
ã«ã¹ããã2ã§äœæãããã©ãã«ãŒããŒã¯ã³ãå ¥ããŠãã ããã ããã·ã¥ããŒãã«ã¯http://app.adjust.com/
ãå«ããã©ãã«ãŒURLã衚瀺ãããŸãã ãœãŒã¹ã³ãŒãå ã«ã¯ãã®URLãã¹ãŠã§ã¯ãªãã6æåã®ããŒã¯ã³ãæãåºããŠæå®ããŠãã ããã -
ã¢ããªããã«ãããŠãã ãããXcodeã§äžèšã®ãããªè¡ã衚瀺ãããã¯ãã§ãã
Default tracker: 'abc123'
URLããã¢ããªãžã®ãã£ãŒããªã³ã¯ã䜿ã£ãadjustãã©ãã«ãŒURLããå©çšã®å Žåããã£ãŒããªã³ã¯URLãšãã®å 容ã®æ å ±ãåŸãããå¯èœæ§ããããŸãã ãŠãŒã¶ãŒããã§ã«ã¢ããªãã€ã³ã¹ããŒã«ããŠããç¶æ ã§ãã®URLã«èšªããå Žå(ã¹ã¿ã³ããŒãã»ãã£ãŒããªã³ãã³ã°)ãšã ã¢ããªãã€ã³ã¹ããŒã«ããŠããªããŠãŒã¶ãŒãURLãéããå Žå(ãã£ãã¡ãŒãã»ãã£ãŒããªã³ãã³ã°)ãæãåŸãŸãã ã©ã¡ãã®å Žåãadjust SDKã§ãµããŒãã§ãããã£ãŒããªã³ã¯URLã¯ãŠãŒã¶ãŒããã®URLã蚪ããŠããã¢ããªãéããåŸã§æäŸãããŸãã ãã®æ©èœã䜿ãå Žåã¯ãæ£ããèšå®ãè¡ã£ãŠãã ããã
ã¢ããªããã§ã«ã€ã³ã¹ããŒã«ããŠãããŠãŒã¶ãŒããã£ãŒããªã³ã¯ããŒã¿ã®ä»å ããããã©ãã«ãŒURLãéããå Žåã ã¢ããªãéããããšãã£ãŒããªã³ã¯ã®æ å ±ã¯ã¢ããªã«éä¿¡ãããŸããiOS 9以éã«ãããŠãApple瀟ã¯ãã£ãŒããªã³ã¯ã®æ±ããå€æŽããŠããŸãã ã©ã¡ãã®ç¶æ³ã§ã¢ããªã«ãã£ãŒããªã³ã¯ã䜿ããããããã¯ãããã端æ«ãã«ããŒããããã«äž¡æ¹ã§ãã£ãŒããªã³ã¯ã䜿ããã«ãã£ãŠã 以äžã®ãããããŸãã¯äž¡æ¹ã®èšå®ãè¡ã£ãŠãã ããã
iOS 8以åã®ç«¯æ«ã§ã®ãã£ãŒããªã³ãã³ã°ã¯ã«ã¹ã¿ã URLã¹ããŒã ã®èšå®ã«ãã£ãŠè¡ãªãããŸããã¢ããªãéãããããã®ã«ã¹ã¿ã URLã¹ããŒã åãã€ããå¿
èŠããããŸãã
ãã®ã¹ããŒã åã¯adjustãã©ãã«ãŒURLã§ãdeep_link
ãã©ã¡ãŒã¿ãšããŠäœ¿ãããŸãããããèšå®ããã«ã¯ãInfo.plist
ãã¡ã€ã«ãéã
URL types
ã®è¡ãæ°ãã«è¿œå ããŠãã ãããããã«ã¢ããªã®ãã³ãã«IDãURL identifier
ãšããŠå
¥åããURL schemes
ã®æ¬ã«è©²åœã®ã¹ããŒã åãå
¥ããŠãã ããã
äžèšã®äŸã§ã¯ãadjustExample
ãšããã¹ããŒã åãæ±ããŸãã
ãããèšå®ããããšã該åœã®ã¹ããŒã åãå«ãdeep_link
ãã©ã¡ãŒã¿ãæã€adjustãã©ãã«ãŒURLãã¯ãªãã¯ããåŸã§ã¢ããªãéãããŸãã
ã¢ããªãéãããåŸãAppDelegate
ã¯ã©ã¹ã®openURL
ã¡ãœãããåŒã°ãããã©ãã«ãŒURLã®deep_link
ãã©ã¡ãŒã¿ã®å
容ãéä¿¡ãããŸãã
ãã®ãã£ãŒããªã³ã¯ã®å
容ããŒã¿ãå©çšãããå Žåããã®ã¡ãœãããäžæžãããŠãã ããã
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
// url object contains your deep link content
// Apply your logic to determine the return value of this method
return YES;
// or
// return NO;
}
ããã§ãiOS 8以åã®ç«¯æ«ãžã®ãã£ãŒããªã³ã¯ã®èšå®ã¯å®äºã§ãã
iOS 9以éã®ç«¯æ«ãžãã£ãŒããªã³ã¯ã察å¿ãããããã«ã¯ãAppleã®ãŠãããŒãµã«ãªã³ã¯ãæå¹åãããå¿ èŠããããŸãã ãŠãããŒãµã«ãªã³ã¯ã«ã€ããŠããããã®èšå®ã«ã€ããŠã¯ãã¡ããã確èªãã ããã
adjustã¯ãŠãããŒãµã«ãªã³ã¯ããµããŒãããããã«æ§ã ãªå¯Ÿå¿ãããŠããŸãã adjustã§ãŠãããŒãµã«ãªã³ã¯ã䜿ãã«ã¯ãadjustããã·ã¥ããŒãã§ãŠãããŒãµã«ãªã³ã¯ã®ããã®èšå®ãè¡ã£ãŠãã ããã 詳ããã¯å ¬åŒè³æãã芧ãã ããã
ããã·ã¥ããŒãã§ã®èšå®ãå®äºãããã以äžã®äœæ¥ãè¡ã£ãŠãã ããã
Appleãã£ããããããŒã¿ã«ã§ã¢ããªã®Associated Domains
ãæå¹åããXcodeãããžã§ã¯ãã§ãåæ§ã«ããŠãã ããã
applinks:
ãåã«ã€ããŠadjustããã·ã¥ããŒãã®Domains
ããŒãžã§çæããããŠãããŒãµã«ãªã³ã¯ãè¿œå ããŠãã ããã
ãŠãããŒãµã«ãªã³ã¯ããhttp(s)
ãåé€ããããšãå¿ããã«ã確èªãã ããã
ãã®èšå®ãå®äºãããšãadjustã®ãã©ãã«ãŒãŠãããŒãµã«ãªã³ã¯ãã¯ãªãã¯ãããåŸã«ã¢ããªãéãããŸãã
ã¢ããªãéããåŸãAppDelegate
ã¯ã©ã¹ã®continueUserActivity
ã¡ãœãããåŒã°ãããŠãããŒãµã«ãªã³ã¯URLã®å
容ãéä¿¡ãããŸãã
ãã®ãã£ãŒããªã³ã¯ã®å
容ããŒã¿ãå©çšãããå Žåããã®ã¡ãœãããäžæžãããŠãã ããã
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL url = [userActivity webpageURL];
// url object contains your universal link content
}
// Apply your logic to determine the return value of this method
return YES;
// or
// return NO;
}
ããã§ãiOS 9以éã®ç«¯æ«ãžã®ãã£ãŒããªã³ã¯ã®èšå®ã¯å®äºã§ãã
åŸæ¥ã®ã«ã¹ã¿ã URLã¹ããŒã ã®ãã©ãŒãããã§ãã£ãŒããªã³ã¯ãåãåããããªç¬èªã®ããžãã¯ãå®è£ ãããŠããå Žåã®ããã«ã adjustã¯ãŠãããŒãµã«ãªã³ã¯ãåŸæ¥ã®ãã£ãŒããªã³ã¯URLã«å€æãããã«ããŒé¢æ°ãçšæããŠããŸãã ãŠãããŒãµã«ãªã³ã¯ãšã«ã¹ã¿ã URLã¹ããŒã ããã®ã¡ãœããã«æž¡ããšãã«ã¹ã¿ã URLã¹ããŒã ã®ãã£ãŒããªã³ã¯ãçæãããŸãã
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL url = [userActivity webpageURL];
NSURL *oldStyleDeeplink = [Adjust convertUniversalLink:url scheme:@"adjustExample"];
}
// Apply your logic to determine the return value of this method
return YES;
// or
// return NO;
}
ãã£ãã¡ãŒãã»ãã£ãŒããªã³ã¯ãéãåã«éç¥ãåããããªã²ãŒãã³ãŒã«ããã¯ãç»é²ããadjust SDKããããéããã©ãã決ããããšãã§ããŸãã
ã¢ããªãã¥ãŒã·ã§ã³ã³ãŒã«ããã¯ãã€ãã³ããšã»ãã·ã§ã³ã®ã³ãŒã«ããã¯ã«äœ¿ããã
AdjustDelegate
ãããã³ã«ãããã§ã䜿ãããšãã§ããŸãã
ᅵ次ã®ã¹ãããã«é²ã¿ããã£ãã¡ãŒãã»ãã£ãŒããªã³ã¯ã®ããªã²ãŒãã³ãŒã«ããã¯é¢æ°ã以äžã®ããã«å®è£ ããŠãã ããã
- (void)adjustDeeplinkResponse:(NSURL *)deeplink {
// deeplink object contains information about deferred deep link content
// Apply your logic to determine whether the adjust SDK should try to open the deep link
return YES;
// or
// return NO;
}
ã³ãŒã«ããã¯é¢æ°ã¯SDKããµãŒããŒããDeferredãã£ãŒããªã³ã¯ãåãåã£ãåŸããããéãåã«ã³ãŒã«ãããŸãã ã³ãŒã«ããã¯é¢æ°å ã§ããã£ãŒããªã³ã¯ãšSDKããã£ãŒããªã³ã¯ãç«ã¡äžãããã©ããã®booleanå€ã確èªã§ããŸãã äŸãã°ããã£ãŒããªã³ã¯ãããã«ã¯éããªãããã«ããå Žåããããä¿åãåŸããä»»æã®ã¿ã€ãã³ã°ã§éãããèšå®ã§ããŸãã
ãã®ã³ãŒã«ããã¯ãå®è£ ãããŠããªãå Žåãadjust SDKã¯ããã©ã«ãã§åžžã«ãã£ãŒããªã³ã¯ãéããŸãã
adjustã¯ãã£ãŒããªã³ã¯ã䜿ã£ããªãšã³ã²ãŒãžã¡ã³ããã£ã³ããŒã³ããµããŒãããŠããŸãã 詳ããã¯å ¬åŒè³æãã芧ãã ããã
ãã®æ©èœããå©çšã®å ŽåããŠãŒã¶ãŒãæ£ãããªã¢ããªãã¥ãŒã·ã§ã³ãããããã«ãadjust SDKãžã®ã³ãŒã«ãè¿œå ããŠãã ããã
ã¢ããªã§ãã£ãŒããªã³ã¯ã®å
容ããŒã¿ãåä¿¡ããããappWillOpenUrl
ã¡ãœãããžã®ã³ãŒã«ãè¿œå ããŠãã ããã
ãã®ã³ãŒã«ã«ãã£ãŠãadjust SDKã¯ãã£ãŒããªã³ã¯ã®äžã«æ°ããªã¢ããªãã¥ãŒã·ã§ã³ãååšãããã調ã¹ããã£ãå Žåã¯adjustãµãŒããŒã«ãããéä¿¡ããŸãã
ãã£ãŒããªã³ã¯ã®ã€ããadjustãã©ãã«ãŒURLã®ã¯ãªãã¯ã«ãã£ãŠãŠãŒã¶ãŒããªã¢ããªãã¥ãŒããããå Žåã
ã¢ããªãã¥ãŒã·ã§ã³ã³ãŒã«ããã¯ããã®ãŠãŒã¶ãŒã®æ°ããã¢ããªãã¥ãŒã·ã§ã³ããŒã¿ã§åŒã°ããŸãã
ãã¹ãŠã®iOSããŒãžã§ã³ã«ãããŠããã£ãŒããªã³ãã³ã°ã»ãªã¢ããªãã¥ãŒã·ã§ã³ããµããŒãããããã®appWillOpenUrl
ã®ã³ãŒã«ã¯äžèšã®ããã«ãªããŸãã
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
// url object contains your deep link content
[Adjust appWillOpenUrl:url];
// Apply your logic to determine the return value of this method
return YES;
// or
// return NO;
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL url = [userActivity webpageURL];
[Adjust appWillOpenUrl:url];
}
// Apply your logic to determine the return value of this method
return YES;
// or
// return NO;
}
åºæ¬èšå®ã§èª¬æããéããã¢ããªã±ãŒã·ã§ã³ããªã²ãŒãã®didFinishLaunching
ãdidFinishLaunchingWithOptions
ã®
ã©ã¡ããã®ã¡ãœããå
ã§adjust SDKãåæåããããšã匷ãã奚ãããŸãã
ããã§ãªãã¹ãæ©ãadjust SDKãåæåããããšã¯éåžžã«éèŠã§ãããããã°SDKã®ãã¹ãŠã®æ©èœã䜿ãããšãã§ããŸãã
ãã®æã«adjust SDKãåæåããªããšãã¢ããªå ã®ãã©ããã³ã°ã«ãããã圱é¿ãåºãŸãã ãã©ããã³ã°ãæ£ããè¡ãããã«ãadjust SDKã¯å¿ ãåæåããŠãã ããã
以äžã®ãããããè¡ãããå ŽåãSDKåæååã ãšå®è¡ãããŸãã
ã
- ã€ãã³ããã©ããã³ã°
- ãã£ãŒããªã³ã¯ãä»ãããªã¢ããªãã¥ãŒã·ã§ã³
- ãã©ããã³ã°ã®ç¡å¹å
- ãªãã©ã€ã³ã¢ãŒã
å®éã«åæåããåã«adjust SDKã®ãã¹ãŠã®æ©èœãå©çšã§ããããã«ãããå Žåã
ã¢ããªå
ã«ã«ã¹ã¿ã ã¢ã¯ã·ã§ã³ã»ãã¥ãŒã€ã³ã°ã¡ã«ããºã
ãæ§ç¯ãããšããæ¹æ³ããããŸãã
adjust SDKã«è¡ãããããã¹ãŠã®åŠçããã¥ãŒã«æ ŒçŽããSDKãåæåãããåŸã§åŠçãããŸãã
ãªãã©ã€ã³ã¢ãŒãã®ç¶æ
ã¯å€ãããããã©ããã³ã°ã®æå¹/ç¡å¹ã®ç¶æ
ãå€ãããã
ãã£ãŒããªã³ã¯ãªã¢ããªãã¥ãŒã·ã§ã³ã¯äžå¯ã§ã€ãã³ããã©ããã³ã°ã¯æé€ãããŸã
ã
ã»ãã·ã§ã³ã®ãã©ããã³ã°ãSDKåæåã®ã¿ã€ãã³ã°ã«åœ±é¿ãããå¯èœæ§ããããŸãã adjust SDKã¯åæåããããŸã§ã©ããªã»ãã·ã§ã³ãååã§ããŸããã ããã¯ãã©ããã³ã°ã®ç²ŸåºŠã«åœ±é¿ãäžããããã·ã¥ããŒãäžã®DAUã®æ°å€ãæ£ãã枬å®ãããªãå¯èœæ§ããããŸãã
ããã«äŸãäžããŸã: ã¹ãã©ãã·ã¥ç»é¢ãåãã®ã¹ã¯ãªãŒã³ä»¥å€ã®ããViewãŸãã¯View ControllerãããŒããããæã«adjust SDKãã¹ã¿ãŒããããšãã ãŠãŒã¶ãŒã¯ããŒã ã¹ã¯ãªãŒã³ãããããžé·ç§»ãããšä»®å®ããŸãã ãŠãŒã¶ãŒãã¢ããªãããŠã³ããŒãããŠéããæãããŒã ã¹ã¯ãªãŒã³ã衚瀺ãããŸãã ãã®æããã®ãŠãŒã¶ãŒã«ããã€ã³ã¹ããŒã«ã¯ãã©ããã³ã°ãããŠããã¯ãã§ããã®ãŠãŒã¶ãŒã¯äœããã®ãã£ã³ããŒã³ããèªå°ãããŠæ¥ãã®ã§ãããã ãã®ãŠãŒã¶ãŒãã¢ããªãèµ·åããæããã®ããã€ã¹ããã»ãã·ã§ã³ãäœãããã¢ããªã®ã¢ã¯ãã£ããŠãŒã¶ãŒãšãªããŸãã ãããadjust SDKã¯ãã®äžé£ã®æµããå šãé¢ç¥ããŸãããadjust SDKãåæåãããšèšå®ãããã¹ã¯ãªãŒã³ã«ãŠãŒã¶ãŒã移åããå¿ èŠãããããã§ãã ãŠãŒã¶ãŒãäœããã®çç±ã§ã¢ããªãæ°ã«å ¥ãããããŒã ã¹ã¯ãªãŒã³ã衚瀺ããçŽåŸã«ã¢ã³ã€ã³ã¹ããŒã«ããå Žåã ãã®ãŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ã«é¢ãããã¹ãŠã®æ å ±ã¯adjust SDKã«ãã©ããã³ã°ãããããšã¯ãªããããã·ã¥ããŒãã«ã衚瀺ãããŸããã
ã€ãã³ãããã©ããã³ã°ããããã«ããã©ããã³ã°ãããã€ãã³ããå
éšã§ãã¥ãŒã€ã³ã°ã¡ã«ããºã ã«å
¥ãã
SDKãåæåãããåŸã§ãã©ããã³ã°ããŠãã ããã
SDKãåæåãããåã«äœãããã€ãã³ããã©ããã³ã°ã¯ããã®ã€ãã³ããé€å€ãããã
ãæ°žä¹
ã«å€±ããã
ããšã«ç¹ãããŸãã
ãããªããªãããã«ãSDKãåæå
ãããŠæå¹å
ãããŠãããã©ããã³ã°ããããã«ããŠãã ããã
ãªãã©ã€ã³ã¢ãŒãã¯SDKã®åæåã®éã§ä¿æããããã®ã§ã¯ãããŸããããªã®ã§ãããã©ã«ãã§ã¯ç¡å¹
ã«èšå®ãããŸãã
SDKã®åæååã«ãªãã©ã€ã³ã¢ãŒããæå¹ã«ãããå Žåã§ããæçµçã«SDKãåæåããããŸã§ã¯ç¡å¹
ã®ãŸãŸã§ãã
ãã©ããã³ã°ã®æå¹å/ç¡å¹åã¯SDKåæåã®éã§ãä¿æãããŸããSDKåæåã®åã«ãã®å€ãåãæ¿ãããå Žåã¯ã åãæ¿ãã¯ç¡èŠãããŸããåæåããããšãSDKã¯åãæ¿ããæ瀺ãããç¶æ (æå¹/ç¡å¹)ã«ãªããŸãã
äžèšã®éãããã£ãŒããªã³ã¯ã»ãªã¢ããªãã¥ãŒã·ã§ã³ã䜿ãéã¯ã
æ§åŒããŠãããŒãµã«ãªã³ã¯ã®ã©ã¡ãã®ãã£ãŒããªã³ã¯ã¡ã«ããºã ãã«ãããŸããã
以äžã®ã³ãŒã«ãããåŸã«NSURL
ãªããžã§ã¯ããåŸãããŸãã
[Adjust appWillOpenUrl:url]
ãã®ã³ãŒã«ãSDKåæåã®åã«è¡ã£ãå Žåãã¢ããªãã¥ãŒããããã¹ãã ã£ãURLããã®ãã£ãŒããªã³ã¯ã®æ
å ±ã¯æ°žä¹
ã«å€±ãããŸãã
ãªã¢ããªãã¥ãŒã·ã§ã³ãæ£ããè¡ãããå Žåã¯ããã®NSURL
ãªããžã§ã¯ãããã¥ãŒã«ã
SDKãåæåããããappWillOpenUrl
ã¡ãœãããåŒã°ããããã«ããŠãã ããã
ã»ãã·ã§ã³ã®ãã©ããã³ã°ã¯adjust SDKãèªåã§è¡ããã¢ããªéçºè ãå¶åŸ¡ããããšã¯ã§ããŸããã ã»ãã·ã§ã³ãã©ããã³ã°ãæ£ããè¡ãããã«ã¯ããã®READMEã§æšå¥šãããéãã«adjust SDKãåæåããããšã¯æ¥µããŠéèŠã§ãã ãããããªããšãã»ãã·ã§ã³ãã©ããã³ã°ãããã·ã¥ããŒãã«è¡šç€ºãããDAUã®æ°å€ã«äºæž¬äžèœãªåœ±é¿ãåºãæãããããŸãã èµ·ãããã誀ãã¯æ§ã ã§ããã¡ããã€ããäžã«æããŸãã
- SDKãåæåãããåã«ãŠãŒã¶ãŒãã¢ããªãåé€ãããšããã®ã€ã³ã¹ããŒã«ãšã»ãã·ã§ã³ã¯ãã©ããã³ã°ããããããã·ã¥ããŒãã«èšé²ãããããšããããŸããã
- SDKã®åæåãåå0æ以éã ã£ãå Žåã«ãŠãŒã¶ãŒãåå0æåã«ã¢ããªãããŠã³ããŒããéããå Žåã ã€ã³ã¹ããŒã«ãšã»ãã·ã§ã³ã¯ç¿æ¥ã®ãã®ãšããŠèšé²ãããæãããããŸãã
- SDKã®åæåãåå0æ以éã ã£ãå Žåãããæ¥ãŠãŒã¶ãŒãå šãã¢ããªãéãããæ¥ä»ãå€ãã£ãçŽåŸã«éãããšãã ã¢ããªãéãããæ¥ãšã¯å¥ã®æ¥ã®DAUã«èšäžãããæãããããŸãã
ãããã®çŸè±¡ãé¿ãããããã¢ããªã±ãŒã·ã§ã³ããªã²ãŒãã®didFinishLaunching
ãdidFinishLaunchingWithOptions
ã¡ãœããã«ãŠ
å¿
ãadjust SDKãåæåããŠãã ããã
Adjust requires ARC
ãšãããšã©ãŒãåºãŠãã«ãã«å€±æããå Žåããã®ãããžã§ã¯ãã¯ARCã䜿ã£ãŠããªããšæãããŸãã
ãã®å ŽåãARCã䜿ããããããžã§ã¯ãã移è¡ããããšãã奚ãããŸãã
ARCã䜿ããããªãå Žåã¯ãã¿ãŒã²ããã®ãã«ãã®æ®µéã§adjustã®ãã¹ãŠã®ãœãŒã¹ãã¡ã€ã«ã§ARCãæå¹åããå¿
èŠããããŸããæé ã¯æ¬¡ã®éãã§ãã
Compile Sources
ãå±éããadjustã®ãã¹ãŠã®ãœãŒã¹ãã¡ã€ã«ãéžæããŠãã ããã
Compiler Flags
ã-fobjc-arc
ã«å€æŽããŠãã ããã(ãã¹ãŠãéžæãReturn
ããŒãæŒããšãã¹ãŠäžæ¬ã§å€ããããŸãã)
ãã®ãšã©ãŒã¯ã¢ããªã«adjust SDKããã¬ãŒã ã¯ãŒã¯ãšããŠè¿œå ããŠããå Žåã«èµ·ããåŸãŸãã
adjust SDKã¯ãœãŒã¹ãã¡ã€ã«äžã«categories
ãããããã®ãããã®æ¹æ³ã§SDKã®çµ±åãããå Žåã¯
Xcodeãããžã§ã¯ãã®èšå®ã®Other Linker Flags
ã«-ObjC
ãã©ã°ãè¿œå ããå¿
èŠããããŸã
ãã®ãšã©ãŒã¯ã€ã³ã¹ããŒã«ã®ãã¹ãã®éã«èµ·ãããŸããã¢ã³ã€ã³ã¹ããŒã«åŸã«å床ã€ã³ã¹ããŒã«ããã ãã§ã¯æ°èŠã€ã³ã¹ããŒã«ãšããŠåäœããŸããã SDKãããŒã«ã«ã§çµ±èšããã»ãã·ã§ã³ããŒã¿ã倱ã£ããšãµãŒããŒã¯å€æããŠãšã©ãŒã¡ãã»ãŒãžãç¡èŠãã ãã®ç«¯æ«ã«é¢ããæå¹ãªããŒã¿ã®ã¿ãäžããããŸãã
ãã®ä»æ§ã¯ãã¹ãäžã«ã¯åä»ãããããŸãããããµã³ãããã¯ã¹ãšæ¬çªçšã®æåãã§ããéãè¿ã¥ããããã«å¿ èŠã§ãã
adjustã®ãµãŒããŒã«ãã端æ«ã®ã»ãã·ã§ã³ããŒã¿ããªã»ããããããšãã§ããŸãããã°ã«ãããšã©ãŒã¡ãã»ãŒãžããã§ãã¯ããŠãã ããã
Session failed (Ignoring too frequent session. Last session: YYYY-MM-DDTHH:mm:ss, this session: YYYY-MM-DDTHH:mm:ss, interval: XXs, min interval: 20m) (app_token: {yourAppToken}, adid: {adidValue})
http://app.adjust.com/forget_device?app_token={yourAppToken}&adid={adidValue}
http://app.adjust.com/forget_device?app_token={yourAppToken}&idfa={idfaValue}
端æ«ã«é¢ããèšé²ãæ¶å»ããããšããã®ãªã³ã¯ã¯Forgot device
ãšè¿ããŸãã
ãããã®ç«¯æ«ã®èšé²ããã§ã«æ¶å»ãããŠããããå€ãäžæ£ã ã£ãå Žåã¯Device not found
ãè¿ããŸãã
ãã¹ã端æ«ã§ã€ã³ã¹ããŒã«ãã·ãã¥ã¬ãŒã·ã§ã³ãããå Žåããã§ã«ã€ã³ã¹ããŒã«ãããã¢ããªããããŸãŸã®ãã¹ã端æ«ã§ Xcodeããã¢ããªãå床ç«ã¡äžããã ãã§ã¯äžååã§ããã¢ããªãå床ç«ã¡äžãçŽããŠãã¢ããªã®ããŒã¿ã¯æ¶å»ãããã ã¢ããªå ã«ããSDKã®ãã¡ã€ã«ã¯ãã¹ãŠãã®ãŸãŸã§ãããªã®ã§ãå床ç«ã¡äžããŠãSDKã¯ãããã®ãã¡ã€ã«ãèªèãã ã¢ããªã¯ãã§ã«ã€ã³ã¹ããŒã«æžã¿(ãã€SDKã¯ãã§ã«èµ·åæžã¿)ã§ãããšå€æããŸãã åããŠã®èµ·åã§ã¯ãªããäœåããã«éããããšå€æãããŸãã
ã€ã³ã¹ããŒã«ãã·ãã¥ã¬ãŒã·ã§ã³ããå Žåã¯æ¬¡ã®æé ã§è¡ã£ãŠãã ããã
- 端æ«ããã¢ããªãã¢ã³ã€ã³ã¹ããŒã«ããŸã (å®å šã«æ¶å»ããŠãã ãã)
- äžèšã®æ¹æ³ã§adjustã®ãµãŒããŒãã端æ«ã«é¢ããèšé²ãæ¶å»ããŠãã ãã
- Xcodeãã端æ«äžã§ã¢ããªãç«ã¡äžãããšã"Install tracked"ã衚瀺ãããã¯ãã§ã
sandbox
ç°å¢ã§ãã¹ããããŠããæã«ãã®ã¡ãã»ãŒãžãåºãããšãããã
ããã¯AppleãiAd.framework
ããŒãžã§ã³3ã§ãªãªãŒã¹ããå€æŽãšé¢é£ããŠããŸãã
ãŠãŒã¶ãŒã¯iAdãããŒãã¯ãªãã¯ããããšã§ã¢ããªãžèªå°ãããããã«ããSDKã¯sdk_click
ããã±ãŒãžãadjustãµãŒããŒã«éã
ã¯ãªãã¯ãããURLã®å
容ã«ã€ããŠç¥ãããŸããiAdãããŒãã¯ãªãã¯ãããã«ã¢ããªãéãããå ŽåãiAdãããŒURLã人çºçã«äœããã
ã©ã³ãã ãªå€ãšãšãã«éãããããAppleãèšå®ããŸãããadjust SDKã¯ãããã人çºçãªãã®ãšå®éã«ã¯ãªãã¯ãããŠã§ããURLãå€å¥ã§ããã
ã©ã¡ãã§ãã£ãŠãadjustãµãŒããŒã«sdk_click
ããã±ãŒãžãéããŸãããããã°ã¬ãã«ãverbose
ã«èšå®ããŠããã°ã
以äžã®ãããªsdk_click
ããã±ãŒãžã衚瀺ãããŸãã
[Adjust]d: Added package 1 (click)
[Adjust]v: Path: /sdk_click
[Adjust]v: ClientSdk: ios4.10.1
[Adjust]v: Parameters:
[Adjust]v: app_token {YourAppToken}
[Adjust]v: created_at 2016-04-15T14:25:51.676Z+0200
[Adjust]v: details {"Version3.1":{"iad-lineitem-id":"1234567890","iad-org-name":"OrgName","iad-creative-name":"CreativeName","iad-click-date":"2016-04-15T12:25:51Z","iad-campaign-id":"1234567890","iad-attribution":"true","iad-lineitem-name":"LineName","iad-creative-id":"1234567890","iad-campaign-name":"CampaignName","iad-conversion-date":"2016-04-15T12:25:51Z"}}
[Adjust]v: environment sandbox
[Adjust]v: idfa XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[Adjust]v: idfv YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY
[Adjust]v: needs_response_details 1
[Adjust]v: source iad3
äœããã®çç±ã§ãã®sdk_click
ãåãä»ããããå Žåãå¥ã®ãã£ã³ããŒã³URLãã¯ãªãã¯ããããšã«ããã¢ããªãéãããŠãŒã¶ãŒãããã¯ãªãŒã¬ããã¯ãŠãŒã¶ãŒãã
ãã®ååšããªãiAdãœãŒã¹ã«ã¢ããªãã¥ãŒããããããšãæå³ããŸãããã®ãããadjustãµãŒããŒã¯ãããç¡èŠããäžèšã®ã¡ãã»ãŒãžã衚瀺ããŸãã
[Adjust]v: Response: {"message":"Unattributable SDK click ignored."}
[Adjust]i: Unattributable SDK click ignored.
ãã®ã¡ãã»ãŒãžã¯SDKã®é£æºã«åé¡ãããããšãæå³ããŠããããã§ã¯ãããŸããããŠãŒã¶ãŒãééã£ãŠã¢ããªãã¥ãŒããŸãã¯ãªã¢ããªãã¥ãŒããããå¯èœæ§ã®ãã
人çºçã«çæãããsdk_click
ãadjustãç¡èŠããããšã瀺ããŠããŸãã
adjust SDKã¯ãã©ããã³ã°ããããèšå®ããããã®ããã©ããã³ã°ããŸããã€ãã³ãã«åçãä»å ããŠããå Žåãéé¡ãšããŠå ¥åããæ°åã®ã¿ãadjustãµãŒããŒã«éä¿¡ãã ããã·ã¥ããŒãã«è¡šç€ºãããŸããadjust SDKããã³adjustãµãŒããŒã¯éé¡ã®å€ãæäœããŸããããã©ããã³ã°ãããå€ãééã£ãŠããå Žåã¯ã adjust SDKããã©ããã³ã°ããããèšå®ãããå€ãééã£ãŠããããšã«ãªããŸãã
éåžžãåçã€ãã³ãããã©ããã³ã°ããããã®ã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
// ...
- (double)someLogicForGettingRevenueAmount {
// This method somehow handles how user determines
// what's the revenue value which should be tracked.
// It is maybe making some calculations to determine it.
// Or maybe extracting the info from In-App purchase which
// was successfully finished.
// Or maybe returns some predefined double value.
double amount; // double amount = some double value
return amount;
}
// ...
- (void)someRandomMethodInTheApp {
double amount = [self someLogicForGettingRevenueAmount];
ADJEvent *event = [ADJEvent eventWithEventToken:@"abc123"];
[event setRevenue:amount currency:@"EUR"];
[Adjust trackEvent:event];
}
ãã©ããã³ã°ãããã¹ãå€ãšã¯éãå€ãããã·ã¥ããŒãã«è¡šç€ºãããŠããå Žåã¯ãéé¡ã®å€ã決å®ããããžãã¯ã®éšåãã確èªãã ããã
adjust SDKã¯MITã©ã€ã»ã³ã¹ãé©çšããŠããŸãã
Copyright (c) 2012-2019 Adjust GmbH, http://www.adjust.com
以äžã«å®ããæ¡ä»¶ã«åŸããæ¬ãœãããŠã§ã¢ããã³é¢é£ææžã®ãã¡ã€ã«ïŒä»¥äžããœãããŠã§ã¢ãïŒã®è€è£œãååŸãããã¹ãŠã®äººã«å¯Ÿãã ãœãããŠã§ã¢ãç¡å¶éã«æ±ãããšãç¡åã§èš±å¯ããŸããããã«ã¯ããœãããŠã§ã¢ã®è€è£œã䜿çšãè€åãå€æŽãçµåãæ²èŒãé åžããµãã©ã€ã»ã³ã¹ã ããã³/ãŸãã¯è²©å£²ããæš©å©ãããã³ãœãããŠã§ã¢ãæäŸããçžæã«åãããšãèš±å¯ããæš©å©ãç¡å¶éã«å«ãŸããŸãã
äžèšã®èäœæš©è¡šç€ºããã³æ¬èš±è«Ÿè¡šç€ºãããœãããŠã§ã¢ã®ãã¹ãŠã®è€è£œãŸãã¯éèŠãªéšåã«èšèŒãããã®ãšããŸãã
ãœãããŠã§ã¢ã¯ãçŸç¶ã®ãŸãŸãã§ãæ瀺ã§ãããæé»ã§ããããåãããäœãã®ä¿èšŒããªãæäŸãããŸãã ããã§ããä¿èšŒãšã¯ãååæ§ãç¹å®ã®ç®çãžã®é©åæ§ãããã³æš©å©é䟵害ã«ã€ããŠã®ä¿èšŒãå«ã¿ãŸãããããã«éå®ããããã®ã§ã¯ãããŸããã äœè ãŸãã¯èäœæš©è ã¯ãå¥çŽè¡çºãäžæ³è¡çºããŸãã¯ãã以å€ã§ããããšããœãããŠã§ã¢ã«èµ·å ãŸãã¯é¢é£ãã ãããã¯ãœãããŠã§ã¢ã®äœ¿çšãŸãã¯ãã®ä»ã®æ±ãã«ãã£ãŠçããäžåã®è«æ±ãæ害ããã®ä»ã®çŸ©åã«ã€ããŠäœãã®è²¬ä»»ãè² ããªããã®ãšããŸãã