EDIT:
Found the cause:
background-image: url('')
in the html element on the landing page somehow caused the page to relaod and execute AMPscript twice in this process. I got rid of that and AMPscript execution works fine. Tested for Chrome 57.0.2987.133.
Original question:
It seems that AMPScript on my microsite is executed twice. To test this behaviour I created test data extension with one text field and landing page within microsite that inserts rows into that data extension. The landing page was created using design view and AMPScript was placed there in HTML gear. AMPScript code:
%%[
var @testValue
set @testValue = RequestParameter("test")
InsertData("TestIfDouble", "test", @testValue)
]%%
%%=v(@testValue)=%%
When I open this landing page, two values are put into DE, e.g. when I open https://pub.s7.exacttarget.com/fffffffffff?test=value my DE consists of records: "value" and "value/sitemap.json".
Strangely, if I open the same url, with additional parameter, e.g. https://pub.s7.exacttarget.com/fffffffffff?test=value&test2=value2, "value" is still being put twice, but with no "/sitemap.json", so my DE has two records: "value" and "value".
Another case is when @testValue is static, like:
%%[
var @testValue
set @testValue = "staticValue"
InsertData("TestIfDouble", "test", @testValue)
]%%
%%=v(@testValue)=%%
Then it is inserted only once.
Even when using different browser (tested for Chrome and Firefox) and with QueryParameter, problem persists. I've done some additional testing and it turns out, that double execution happens only on design view landing page, within microsite. Standalone landing page (code view as well as design view) and code view landing page on microsite insert value only once.
RequestParameter
withQueryParameter
do you still get the same behavior?