Just wondering if there is a way of getting the <tridion:IncrementKey runat="server">
Profiling and Personalisation tracking working with Dynamic Component Presentations?
I have been struggling to get this working so have tried going back to basics to try and figure out where I have gone wrong. So started again and have used the example given on live content here to output the DCP but still no luck. It outputs the presentation but misses off the <tridion:IncrementKey runat="server">
part.
<%@Page language="C#"%>
<%@ Import Namespace="Tridion.ContentDelivery.DynamicContent"%>
<%
ComponentPresentationAssembler componentPresentationAssembler = null;
componentPresentationAssembler = new ComponentPresentationAssembler("[%=Page.ID%]",Page);
int publicationId = 1;
string component = "tcm:" + publicationId + "-" + Request.QueryString["ComponentId"];
string template = "tcm:" + publicationId + "-" + Request.QueryString["ComponentTemplateId"] + "-32";
%>
<html>
<head>
<title>Dynamic Component Link Destination Page</title>
</head>
<body>
Assembled Component:
<%Response.Write(componentPresentationAssembler.GetContent(component, template));%>
</body>
</html>
<%
componentPresentationAssembler.Dispose();
%>
I don't believe it's the Component Template that is wrong as if I add it to the page manually (using the CM) the output looks OK with all the <tridion:IncrementKey runat="server">
added as expected.
But I attach a screen shot of the settings just for sanities sake
Then in the Compound Template I just have the following TBBs in the following order
- My custom dreamweaver TBB (stripped back test code below)
- Activate Tracking (default template)
- Default Finishing Actions (default template)
The template building block above is just the following line of code (again stripped back to try and get it working)
<!--Adding hidden component @@Component.ID@@ -->
I also added the Activate Tracking TBB to the Page Template to try and make sure but again no joy.
I imagine this is going to be one of those issues where there is something easy I've missed but at the moment I can't see where it is.
Thanks for reading!