title: AMP Analytics Source with Slash in URL
body: <p>I'm using the <code>amp-analytics</code> component in an AMP page to track page views. My request source (the endpoint to send data to) includes a forward slash like so:</p>
  
  <p><code>request.source.com/endpoint</code></p>
  
  <p>AMP doesn't like this and gives the following error:</p>
  
  <pre><code>amp-analytics request source must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value:
  
  https://request.source.com%2Fendpoint/i?url=http%3A%2F%2Fcontent.url.com%3A8079%2Fregular-html-version.html&amp;page=Sample%20document&amp;res=2560x1440&amp;stm=1538590011734&amp;tz=240&amp;aid=25&amp;p=web&amp;tv=amp-0.2&amp;cd=24&amp;cs=UTF-8&amp;duid=amp-CGG5vSIemmau7QUKCzi1yw&amp;lang=en-us&amp;refr=&amp;stm=240&amp;vp=452x1270&amp;e=pv
  </code></pre>
  
  <p>Note that it URL-encoded the forward slash to <code>%2F</code>. I also tried encoding it in the script. This made no difference.</p>
  
  <p>Also note that when I remove the forward slash from the request source (i.e. just use <code>request.source.com</code>), then it works fine. (But it's a product requirement that the endpoint contains that forward slash).</p>
  
  <p>Any thoughts on how to achieve this? Here is my AMP code:</p>
  
  <pre><code>&lt;script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"&gt;&lt;/script&gt;
  &lt;amp-analytics type="snowplow" id="snowplow1"&gt;
      &lt;script type="application/json"&gt;
          {
              "vars": {
                  "collectorHost": "request.source.com/endpoint",
                  "appId": "25"
              },
              "triggers": {
                  "trackPageview": {
                      "on": "visible",
                      "request": "pageView"
                  }
              }
          }
      &lt;/script&gt;
  &lt;/amp-analytics&gt;
  </code></pre>