Django Epsilon服务
django-epsilon的Python项目详细描述
django epsilon
Epsilon.comdjango应用程序的api集成
安装
pipinstalldjango-epsilon
用法
fromepsilon.modelsimportEpsilonprofile={'first_name':'John','last_name':'Smith','date_of_birth':'1990-01-01','zip_code':'12345','email':'john.smith@example.com'}promotion_id=Epsilon.addProfile(profile,add_survey=True)
配置
将这些变量添加到django设置中
fromosimportgetenv# If set to False, API will never be calledEPSILON_ON=getenv('EPSILON_ON',True)# Enables django signalsEPSILON_AUTO_PUSH=getenv('EPSILON_AUTO_PUSH',False)# Epsilon.com client settingsEPSILON_CLIENT_ID=''EPSILON_CLIENT_SECRET=''EPSILON_API_ENDPOINT='https://your_url.epsilon.com/CPGWebServices'EPSILON_CAMPAIGN_CONTROL_ID=''EPSILON_QUESTION_ANSWER_ID=''# Epsilon.com campaign settingsEPSILON_TRACKING_INFO_DOMAIN_HASH=''EPSILON_TRACKING_INFO_TIMESTAMP=''EPSILON_TRACKING_UTM_SOURCE=''EPSILON_TRACKING_UTM_MEDIUM=''EPSILON_TRACKING_UTM_TERM=''EPSILON_TRACKING_UTM_CONTENT=''EPSILON_TRACKING_UTM_CAMPAIGN=''