Repository: oppia/oppia

Issue:
Landing pages for fractions
In Google Search, when I click on an Oppia ad about 'fractions', the landing page is generic, and not about fractions. Let's change that, to increase conversion rate.

This zip file contains 4 landing pages for fractions:
[landing_pages_fractions.zip](https://github.com/oppia/oppia/files/953595/landing_pages_fractions.zip)

Based on user testing, we think variation C will be most successful. Please:
- Publish all 4 of the landing pages, and have the calls-to-action point to the fractions collection or a specific exploration
- Provide 5 URLs: one for each landing page, and one that brings up a random one from the set

Thanks,
Rahim.


Discussion:
@Arunabh98 This would probably go best under a new folder located at `core/templates/dev/head/pages/landing/fractions`.

Also, instead of the fifth page for randomizing which landing page displays, we could reimplement logic similar to what was removed in 53b2cdc.

Resolving patch:
diff --git a/core/controllers/custom_landing_pages.py b/core/controllers/custom_landing_pages.py
new file mode 100644
--- /dev/null
+++ b/core/controllers/custom_landing_pages.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+# Copyright 2015 The Oppia Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS-IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Controllers for custom landing pages."""
+
+import random
+from core.controllers import base
+
+
+class FractionLandingPage(base.BaseHandler):
+    """Page showing the landing page for fractions. It will randomly select a
+    version out of the four versions of fractions landing page and display it.
+    """
+
+    def get(self):
+        """Handles GET requests."""
+        version_id = self.request.get('v')
+
+        if not version_id:
+            version_ids = ['a', 'b', 'c', 'd']
+            version_id = random.choice(version_ids)
+            self.redirect('/fractions?v=%s' % version_id)
+
+        self.render_template(
+            'pages/landing/fractions/landing_page_%s.html' % version_id)
diff --git a/feconf.py b/feconf.py
--- a/feconf.py
+++ b/feconf.py
@@ -519,6 +519,7 @@ def get_empty_ratings():
 FEEDBACK_THREADLIST_URL_PREFIX = '/threadlisthandler'
 FEEDBACK_THREAD_VIEW_EVENT_URL = '/feedbackhandler/thread_view_event'
 FLAG_EXPLORATION_URL_PREFIX = '/flagexplorationhandler'
+FRACTIONS_LANDING_PAGE_URL = '/fractions'
 LIBRARY_GROUP_DATA_URL = '/librarygrouphandler'
 LIBRARY_INDEX_URL = '/library'
 LIBRARY_INDEX_DATA_URL = '/libraryindexhandler'
diff --git a/main.py b/main.py
--- a/main.py
+++ b/main.py
@@ -21,6 +21,7 @@
 from core.controllers import base
 from core.controllers import collection_editor
 from core.controllers import collection_viewer
+from core.controllers import custom_landing_pages
 from core.controllers import dashboard
 from core.controllers import email_dashboard
 from core.controllers import editor
@@ -211,7 +212,8 @@ def ui_access_wrapper(self, *args, **kwargs):
     get_redirect_route(
         r'/value_generator_handler/<generator_id>',
         resources.ValueGeneratorHandler),
-
+    get_redirect_route(r'%s' % feconf.FRACTIONS_LANDING_PAGE_URL,
+                       custom_landing_pages.FractionLandingPage),
     get_redirect_route(r'%s' % feconf.LIBRARY_INDEX_URL, library.LibraryPage),
     get_redirect_route(r'%s' % feconf.LIBRARY_INDEX_DATA_URL,
                        library.LibraryIndexHandler),


Test patch: