2016-09-15 5 views
0

SparkPost APIを使用してクリック数を追跡する必要のあるURLとともにメールテンプレートを送信しようとしていますか? 例:www.google.comにhttp://go.sparkpostmail1.com/f/a/EgvUoS2LdGPzMx-AURKwZA~~/AABUGAA~/RgRZK0BSP0EIAGukLuGW3OxXA3NwY1gEAAAAAFkGc2hhcmVkQgoAAVK7SFdpNVEbUhFuaWNvbGFzQGR1cmFuZC5jaAlRBAAAAABEUWh0dHBzOi8vZGlzaGx5Lm1lbnUvZC9XYXNoaW5ndG9uL1JlZ2VudF9UaGFpL0Jhc2lsX0phZS81NjBmMzk5MmQ0YWUxNTAzMDBmZWZmMGIiLEcCe30に変更する必要があります。SparkPostへの通常のURLを変更するにはPHPを使用したSparkPost APIのカスタムURL?

POST/API/V1 /トランスミッション?num_rcpt_errors = 3

{ 
    "options": { 
    "start_time": "now", 
    "open_tracking": true, 
    "click_tracking": true, 
    "transactional": false, 
    "sandbox": false, 
    "ip_pool": "sp_shared", 
    "inline_css": false 
    }, 
    "description": "Christmas Campaign Email", 
    "campaign_id": "christmas_campaign", 
    "metadata": { 
    "user_type": "students", 
    "education_level": "college" 
    }, 
    "substitution_data": { 
    "sender": "Big Store Team", 
    "holiday_name": "Christmas" 
    }, 
    "recipients": [ 
    { 
     "address": { 
     "email": "[email protected]", 
     "name": "Wilma Flintstone" 
     }, 
     "tags": [ 
     "greeting", 
     "prehistoric", 
     "fred", 
     "flintstone" 
     ], 
     "metadata": { 
     "age": "24", 
     "place": "Bedrock" 
     }, 
     "substitution_data": { 
     "customer_type": "Platinum", 
     "year": "Freshman" 
     } 
    } 
    ], 
    "content": { 
    "from": { 
     "name": "Fred Flintstone", 
     "email": "[email protected]" 
    }, 
    "subject": "Big Christmas savings!", 
    "reply_to": "Christmas Sales <[email protected]>", 
    "headers": { 
     "X-Customer-Campaign-ID": "christmas_campaign" 
    }, 
    "text": "Hi \nSave big this Christmas in your area ! \nClick http://www.example.com and get huge discount\n Hurry, this offer is only to \n ", 
    "html": "<p>Hi \nSave big this Christmas in your area ! \nClick http://www.example.com and get huge discount\n</p><p>Hurry, this offer is only to \n</p><p></p>" 
    } 
} 

答えて

0

"追跡をクリックし、" 有効にするには、あなたの要求にoptions.click_tracking=trueフィールドを設定します。既にこれを行っていますが、content.htmlのリンクはHTMLアンカー(<a>タグ)ではなくプレーンテキストのリンクであるようです。

http://www.example.com

これに:

SparkPostはだけなので、私はこの変更を提案HTMLアンカーを追跡する

<a href="http://www.example.com">www.example.com</a>

関連する問題