logo
Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Erwin  
#1 Posted : Friday, September 4, 2015 2:17:27 PM(UTC)
Erwin

Rank: Administration

Reputation:

Groups: Moderators, Administration, Member
Joined: 10/8/2008(UTC)
Posts: 44

What it does:

It uses a control to send website-visitors to pageA or pageB per session with a 302 redirect (so the original page will stay in the google-cache, and the test page will not be entered into the google-index. You have to setup a SIENN-table with some fields, and put a control in the original page.
This control will send you to pageA or B depending on it's session. Put the control in a text/view/form/whatever with a parameter (with the value of the identifier).
EG: if the opencontrol is number 73 and you use identifier 1:
Code:
{!$Control.36.73.1$!}

In your testpages (pageA and pageB) put noindex and nofollow metatag:
Code:
<meta name="robots" content="noindex, nofollow">

After your testing (after a month or so) you can put the code of the new page in the original page and delete the control and the metatags.

The SIENN-table:
Code:

Tablename: abtest
Field: identifier (integer) UNIQUE, required, show at overview
Field: toggle (bit)
Field: urla (textX 500), required, show at overview
Field: urlb (textX 500), required, show at overview


The code of the control:
Code:

Dim Identifier as integer = Par(0)
'Dim Cid As String = SApp.SSetup.SiennClientCid 'ML engine 
Dim Cid as string = pbw.get_Cid_currentdomain() 'CMS4 engine
Dim Prefix As String = Cid & "U_"
Dim ABsessionstring as string = "ABTEST" & Identifier
Dim ABSession as string = Session(ABsessionstring)
Dim Url as string = ""
If not string.IsNullOrEmpty(ABSession) Then
  Url = ABSession
Else
  
    Using con As New SqlConnection(Constring)
        Try
            Dim queryStr As String = String.Format(" update [{0}abtest] Set toggle = 0 where Toggle IS NULL " &
                                        " SELECT  " &
                                        "     CASE WHEN [toggle] = 1 " &
                                        "       Then [urla] " &
                                        "     else  [urlb] " &
                                        "   END  as url" &
                                        " FROM [dbo].[{0}abtest] " &
                                        " where identifier =@ident " &
                                        " update [{0}abtest] " &
                                        " set toggle = [toggle] ^ 1 " &
                                        " where identifier =@ident ", Prefix)
            Dim com As New SqlCommand(queryStr, con)
            con.Open()
            com.Parameters.AddWithValue("@ident", Identifier)
            Dim Reader As SqlDataReader = Com.ExecuteReader()
            While Reader.Read()
                Url = Microsoft.VisualBasic.Iif(Not Microsoft.VisualBasic.IsDBNull(reader("url")), reader("url"), "") 
            End While
        Catch ex As Exception
            response.write(ex.tostring)
        Finally
            con.Close()
        End Try
    End Using
    Session(ABsessionstring) = Url
End If

If not string.IsNullOrEmpty(Url) Then
  Response.redirect(url,false)
End If

Edited by user Wednesday, September 9, 2015 10:48:24 AM(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your Sienn Forum forum account. New Registrations are disabled.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.